Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 5b01a3f

Browse files
author
Amir Blum
authored
ci: publish action test (#3)
1 parent 3e309ff commit 5b01a3f

File tree

2 files changed

+40
-1
lines changed
  • .github/workflows
  • resource_detectors/deployment/lib/opentelemetry/resource/detector/deployment

2 files changed

+40
-1
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dir:
7+
description: "Directory of gem to publish"
8+
required: true
9+
default: "resource_detectors/deployment"
10+
11+
jobs:
12+
Publish:
13+
runs-on: ubuntu-latest
14+
# if: github.ref == 'refs/heads/master'
15+
steps:
16+
- name: Install Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 2.7
20+
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: CD into gem directory
25+
run: cd ${{ github.event.inputs.dir }}
26+
27+
- name: Bundle Install
28+
run: bundle install
29+
30+
- name: Publish gem
31+
run: |
32+
mkdir -p $HOME/.gem
33+
touch $HOME/.gem/credentials
34+
chmod 0600 $HOME/.gem/credentials
35+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
36+
gem build *.gemspec
37+
gem push *.gem
38+
env:
39+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"

resource_detectors/deployment/lib/opentelemetry/resource/detector/deployment/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module OpenTelemetry
44
module Resource
55
module Detector
66
module Deployment
7-
VERSION = '0.0.0.rc1'
7+
VERSION = '0.0.1'
88
end
99
end
1010
end

0 commit comments

Comments
 (0)