Skip to content

Commit fd92bef

Browse files
authored
Add workflow for Trusted Publishing to RubyGems.org (#14)
See https://guides.rubygems.org/trusted-publishing/ This will push a release to RubyGems.org when we push a tag to the repo.
1 parent e20c6bc commit fd92bef

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
workflow_dispatch:
8+
9+
jobs:
10+
release:
11+
if: github.repository == '84codes/rubocop-eighty-four-codes'
12+
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write # for trusted publishing
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
bundler-cache: true
20+
ruby-version: ruby
21+
- uses: rubygems/[email protected]
22+
# ensure gem can be built and installed, push to rubygems.org
23+
- run: gem build rubocop-eightyfourcodes
24+
- run: gem install *.gem
25+
- run: gem push *.gem

0 commit comments

Comments
 (0)