Skip to content

Commit

Permalink
Proper setting of release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalFlow authored Dec 17, 2020
1 parent 959b383 commit c411c1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ jobs:
node-version: [12.x]

steps:
- name: Branch name
if: startsWith(github.ref, 'refs/tags/')
id: branch_name
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Bump version number locally on tag
if: startsWith(github.ref, 'refs/tags/')
run: npm version --no-git-tag-version "${{ github.ref }}"
run: npm version --no-git-tag-version $SOURCE_TAG
env:
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
- run: npm ci
- run: npm run build
- name: Publish to npm on release
Expand Down

0 comments on commit c411c1f

Please sign in to comment.