Skip to content

Commit 10435bf

Browse files
committed
run on tag
1 parent 6bf7e72 commit 10435bf

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,25 @@ jobs:
2222
ruby-version: ${{ matrix.ruby }}
2323
bundler-cache: true
2424
- run: bundle exec rake
25+
26+
# run only on semantic version tag
27+
release:
28+
needs:
29+
- test
30+
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
31+
runs-on: ubuntu-latest
32+
strategy:
33+
fail-fast: true
34+
steps:
35+
- name: checkout
36+
uses: actions/checkout@v4
37+
38+
# GITHUB_ENV operates like a .env file
39+
- name: extract version
40+
run: |
41+
VERSION=${GITHUB_REF#refs/tags/}
42+
CLEAN_VERSION=${VERSION#v}
43+
echo "VERSION=$VERSION" >> $GITHUB_ENV
44+
echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_ENV
45+
46+

0 commit comments

Comments
 (0)