File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish and Release Gem
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ paths :
7
+ - " VERSION"
8
+ workflow_dispatch :
9
+
10
+ jobs :
11
+ release :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
17
+
18
+ - name : Setup Ruby
19
+ uses : ruby/setup-ruby@8a45918450651f5e4784b6031db26f4b9f76b251
20
+ with :
21
+ bundler-cache : true
22
+
23
+ - name : Run Tests
24
+ run : script/test
25
+
26
+ - name : Build Gem
27
+ run : |
28
+ echo "GEM_VERSION=$(gem build entitlements-gitrepo-auditor-plugin.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV
29
+ - name : Publish to GitHub Packages
30
+ run : |
31
+ GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/github entitlements-gitrepo-auditor-plugin-${{ env.GEM_VERSION }}.gem
You can’t perform that action at this time.
0 commit comments