Skip to content

Commit f1e3381

Browse files
Merge pull request #30 from InVisionApp/develop
patch: use semantic-release action and auto-update v<major> tag
2 parents 8ec5c58 + 623dc92 commit f1e3381

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ jobs:
3333
run: cc-test-reporter after-build
3434
env:
3535
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
36-
- name: Test release
36+
- name: Release
37+
if: github.ref == 'refs/heads/master'
38+
id: semantic
39+
uses: cycjimmy/semantic-release-action@v2
3740
env:
3841
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: npx semantic-release --dry-run --branch ${GITHUB_REF##*/}
40-
- name: Release
41-
run: npx semantic-release # this only runs on master and develop. see .releaserc.js
42+
- name: Update major version tag (e.g., v1)
43+
if: github.ref == 'refs/heads/master'
44+
run: git tag -f v${MAJOR_VERSION} && git push origin v${MAJOR_VERSION}
4245
env:
43-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
MAJOR_VERSION: ${{ steps.semantic.outputs.new_release_major_version }}

0 commit comments

Comments
 (0)