Skip to content

Release

Release #92

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
env:
MAJOR_VERSION_TAG: v6
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install dependencies
run: |
npm --global install npm@latest
npm ci
- name: Set up Git
run: |
git config --local user.name "${GITHUB_ACTOR}"
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Run release script
run: |
npm run release
echo "NEW_TAG_NAME=$(git describe --abbrev=0)" >> "${GITHUB_ENV}"
- name: Push a release commit and new tags
run: |
git push --follow-tags
git tag --force --annotate --message "Release ${MAJOR_VERSION_TAG}" "${MAJOR_VERSION_TAG}"
git push --tags --force origin "${MAJOR_VERSION_TAG}"
- name: Create a release
run: |
gh release create "${NEW_TAG_NAME}" \
--notes "See the [changelog](https://github.com/${GITHUB_REPOSITORY}/blob/${NEW_TAG_NAME}/CHANGELOG.md) for details."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}