You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
913 B

2 years ago
2 years ago
9 months ago
2 years ago
  1. name: Bump version
  2. on:
  3. workflow_run:
  4. workflows: ["Lint"]
  5. branches: [master]
  6. types:
  7. - completed
  8. jobs:
  9. tag-version:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v3
  13. with:
  14. token: ${{ secrets.PAT_TOKEN }}
  15. - uses: actions/setup-node@v3
  16. with:
  17. node-version: 20
  18. - name: determine-version
  19. run: |
  20. VERSION=$(npx semantic-release --branches master --dry-run | { grep -i 'the next release version is' || test $? = 1; } | sed -E 's/.* ([[:digit:].]+)$/\1/')
  21. echo "VERSION=$VERSION" >> $GITHUB_ENV
  22. id: version
  23. - uses: rickstaa/action-create-tag@v1
  24. continue-on-error: true
  25. env:
  26. GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
  27. with:
  28. tag: v${{ env.VERSION }}
  29. message: "Releasing v${{ env.VERSION }}"
  30. github_token: ${{ secrets.PAT_TOKEN }}