File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+ on :
3
+ push :
4
+ tags :
5
+ - " v0.*"
6
+ jobs :
7
+ publish :
8
+ runs-on : ubuntu-latest
9
+ strategy :
10
+ fail-fast : true
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ - name : Set up Ruby
14
+ uses : ruby/setup-ruby@v1
15
+ with :
16
+ ruby-version : 3.3.0
17
+ # get tag variable using {{ github.ref_name }}
18
+ #
19
+ # References:
20
+ # * https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
21
+ # * https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
22
+ - name : extract gem version from tag
23
+ id : vars
24
+ run : echo version=${{ github.ref_name }} | sed -e 's/v0/0/' >> $GITHUB_OUTPUT
25
+ #
26
+ # From gem push documents.
27
+ #
28
+ # The push command will use ~/.gem/credentials to authenticate to a server,
29
+ # but you can use the RubyGems environment variable GEM_HOST_API_KEY
30
+ # to set the api key to authenticate.
31
+ #
32
+ # https://guides.rubygems.org/command-reference/#gem-push
33
+ #
34
+ - name : Publish
35
+ run : |
36
+ rake build
37
+ gem push pkg/${EMBULK_PLUGIN_NAME}-${{ steps.vars.outputs.version }}.gem
38
+ env :
39
+ EMBULK_PLUGIN_NAME : embulk-output-bigquery
40
+ GEM_HOST_API_KEY : " ${{secrets.RUBYGEMS_API_KEY}}"
You can’t perform that action at this time.
0 commit comments