We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 507f6c0 commit 101defeCopy full SHA for 101defe
1 file changed
.github/workflows/publish.yml
@@ -0,0 +1,39 @@
1
+name: Publish to RubyGems
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
8
+permissions:
9
+ contents: write
10
+ id-token: write
11
12
+jobs:
13
+ publish:
14
+ name: Build and publish
15
+ runs-on: ubuntu-latest
16
+ environment: rubygems
17
18
+ steps:
19
+ - uses: actions/checkout@v6
20
+ with:
21
+ persist-credentials: false
22
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
26
+ ruby-version: "3.4"
27
+ bundler-cache: true
28
29
+ - name: Verify tag matches gem version
30
+ run: |
31
+ tag="${GITHUB_REF#refs/tags/v}"
32
+ version=$(ruby -r ./lib/customerio/version -e "puts Customerio::VERSION")
33
+ if [ "$tag" != "$version" ]; then
34
+ echo "::error::Tag v$tag does not match Customerio::VERSION ($version)"
35
+ exit 1
36
+ fi
37
38
+ - name: Publish to RubyGems
39
+ uses: rubygems/release-gem@v1
0 commit comments