chore(deps-dev): bump @typescript-eslint/parser from 8.13.0 to 8.14.0 #477
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
concurrency: | |
group: release | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
validate-release-trigger: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check if release should be skipped | |
id: lastcommit | |
shell: bash | |
# As described in the docs the skip-checks should prevent this push-triggered action from execution. | |
# But the action still triggers - not sure why this is the case. | |
# see: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs | |
run: | | |
if [[ ${{ toJSON(github.event.head_commit.message) }} == *"skip-checks: true"* ]]; then | |
echo "'skip-checks: true' found" | |
echo "::set-output name=skipchecks::true" | |
else | |
echo "'skip-checks: true' NOT found" | |
echo "::set-output name=skipchecks::false" | |
fi | |
outputs: | |
skipchecks: ${{ steps.lastcommit.outputs.skipchecks }} | |
release-drafter: | |
runs-on: ubuntu-latest | |
needs: validate-release-trigger | |
permissions: | |
contents: write # for release-drafter/release-drafter to create a github release | |
pull-requests: write # for release-drafter/release-drafter to add label to PR | |
if: ${{ needs.validate-release-trigger.outputs.skipchecks == 'false' }} | |
steps: | |
# Drafts your next Release notes as Pull Requests are merged into "main" | |
- uses: release-drafter/release-drafter@v6 | |
id: releasedrafter | |
with: | |
config-name: release-drafter.yaml | |
publish: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
tag: ${{ steps.releasedrafter.outputs.tag_name }} | |
release: | |
runs-on: ubuntu-latest | |
needs: release-drafter | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
# Using PAT because if the action will be triggered automatically by dependabot the GITHUB_TOKEN has no write permission | |
# see: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/ | |
token: ${{ secrets.PAT }} | |
- name: install node 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: download dependencies | |
shell: bash | |
run: npm install | |
- name: build binaries | |
shell: bash | |
run: npm run build | |
- name: package binaries | |
shell: bash | |
run: npm run package | |
- name: bump version (npm) | |
shell: bash | |
run: npm version --no-git-tag-version --new-version ${{ needs.release-drafter.outputs.tag }} | |
- name: bump version (README) | |
shell: bash | |
run: sed -i -E "s/@(v[0-9]*\.[0-9]*\.[0-9]*)/@${{ needs.release-drafter.outputs.tag }}/g" README.md | |
- name: commit version bump | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: | | |
chore(release): update version to ${{ needs.release-drafter.outputs.tag }} | |
skip-checks: true | |
branch: main | |
file_pattern: package.json README.md | |
- name: configure git | |
shell: bash | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: commit binaries | |
shell: bash | |
run: | | |
git checkout -b release/${{ needs.release-drafter.outputs.tag }} | |
git add --force dist/ | |
git commit \ | |
-m "chore(release): add binaries ${{ needs.release-drafter.outputs.tag }}" \ | |
-m "skip-checks: true" | |
- name: move release tag | |
shell: bash | |
run: | | |
git tag --force ${{ needs.release-drafter.outputs.tag }} HEAD | |
git push --force origin ${{ needs.release-drafter.outputs.tag }} | |
- name: update latest tag | |
shell: bash | |
run: | | |
git tag --force latest HEAD | |
git push --force origin latest |