Skip to content

Commit

Permalink
ci: automatically tag
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioArnt committed Jan 17, 2024
1 parent 3f49875 commit ae653b2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
runs-on: ubuntu-latest
needs: run_tests
outputs:
is_bumped: ${{ steps.npm_check.outputs.changes }}
is_bumped: ${{ steps.npm_check.outputs.bump }}
npm_target_version: ${{ steps.npm_check.outputs.target_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -49,7 +50,8 @@ jobs:
run: |
manifest=$(jq -r '.version' ./npm/robespierre/package.json)
npm=$(npm view robespierre --json | jq -r '.version')
[[ "$manifest" == "$npm" ]] && echo "false" >> "$GITHUB_OUTPUT" || echo "true" >> "$GITHUB_OUTPUT"
[[ "$manifest" == "$npm" ]] && echo "bump=false" >> "$GITHUB_OUTPUT" || echo "bump=true" >> "$GITHUB_OUTPUT"
echo "target_version=$(jq -r '.version' ./npm/robespierre/package.json)" >> "$GITHUB_OUTPUT"
publish-npm-binaries:
name: Publish NPM packages
Expand Down Expand Up @@ -151,3 +153,9 @@ jobs:
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions-ecosystem/action-push-tag@v1
env:
TARGET_VERSION: ${{needs.need_publish.outputs.npm_target_version}}
name: Push tag
with:
tag: $TARGET_VERSION

0 comments on commit ae653b2

Please sign in to comment.