File tree Expand file tree Collapse file tree 1 file changed +10
-19
lines changed
Expand file tree Collapse file tree 1 file changed +10
-19
lines changed Original file line number Diff line number Diff line change 1- name : Build and Deploy CLI Binary
1+ name : RubyGems Deploy
22
33on :
44 workflow_dispatch :
5- inputs :
6- version :
7- description : ' Version to release (e.g. 1.0.0)'
8- required : true
9- type : string
105
116jobs :
127 build :
13- name : Build CLI Binary
8+ name : Build and Deploy CLI
149 runs-on : ubuntu-latest
1510 defaults :
1611 run :
1712 working-directory : cli
13+ permissions :
14+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
15+ contents : write # IMPORTANT: this permission is required for `rake release` to push the release tag
1816
1917 steps :
2018 - uses : actions/checkout@v4
@@ -31,13 +29,10 @@ jobs:
3129 gem install bundler
3230 bundle install
3331
34- - name : Build the gem
35- run : gem build emerge.gemspec
32+ - name : Build and install gem locally
33+ run : bundle exec rake install
3634
37- - name : Install the gem
38- run : gem install --user-install emerge-*.gem
39-
40- - name : Update PATH and test emerge
35+ - name : Test emerge CLI
4136 run : |
4237 export PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"
4338 OUTPUT=$(emerge -h 2>&1 || true)
4742 echo "$OUTPUT" | grep -q "emerge integrate \[SUBCOMMAND\]" || { echo "Expected integrate command not found"; exit 1; }
4843 echo "$OUTPUT" | grep -q "emerge upload \[SUBCOMMAND\]" || { echo "Expected upload command not found"; exit 1; }
4944
50- # - name: Upload binary artifact
51- # uses: actions/upload-artifact@v4
52- # with:
53- # name: emerge_cli
54- # path: cli/emerge-cli-output
55- # if-no-files-found: error
45+ - name : Release Gem
46+ uses : rubygems/release-gem@v1
You can’t perform that action at this time.
0 commit comments