File tree Expand file tree Collapse file tree 2 files changed +9
-32
lines changed Expand file tree Collapse file tree 2 files changed +9
-32
lines changed Original file line number Diff line number Diff line change 1- # Build, test and push gems to the FreeAgent registry.
2- # https://github.com/orgs/fac/packages?ecosystem=rubygems
3- # https://www.notion.so/freeagent/Internal-gems-5c8098501fcc48e4921be31aa9b4d495
41name : Build and Release Gem
52on :
6- push :
7- branches :
8- - main
9- pull_request :
3+ workflow_run :
4+ workflows : ["Tests"]
5+ types :
6+ - completed
107 workflow_dispatch :
118
129jobs :
13- tests :
14- runs-on : ubuntu-latest
15- name : Run tests
16-
17- steps :
18- - uses : actions/checkout@v4
19- - uses : ruby/setup-ruby@v1 # .ruby-version
20- with :
21- bundler-cache : true # bundle install
22-
23- # Tests expect a user like git setup
24- - name : Setup Git
25- run : |
26- git config --global user.name "$(git log -1 --pretty=format:%an)"
27- git config --global user.email "$(git log -1 --pretty=format:%ae)"
28-
29- - name : Test
30- run : bundle exec rake
31-
32- # Builds that pass testing above, will trigger a build and push of the new
33- # gem version to the registry. If the version.rb has not been bumped since
34- # the last release, the push will no-op.
3510 release :
36- needs : tests
3711 name : Release to GitHub Packages
3812 runs-on : ubuntu-latest
13+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
14+ permissions :
15+ packages : write
16+ contents : write
3917
4018 steps :
4119 - uses : fac/ruby-gem-setup-credentials-action@v2
Original file line number Diff line number Diff line change 1- name : Ruby
1+ name : Tests
22
33on :
44 push :
55 branches :
66 - main
7-
87 pull_request :
98
109jobs :
You can’t perform that action at this time.
0 commit comments