Release #20
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
# Very important! | |
# Make sure that the github token has read AND WRITE access on github. | |
# 1. hit https://github.com/seatsio/[REPO]/settings/actions | |
# 2. under "Workflow permissions", make sure "Read and write permissions" is checked instead of the (default?) read only. | |
name: 'Release' | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Bump version or release current version without changing package.json. Major for incompatible API changes, minor for adding backwards compatible features, patch for bugfixes.' | |
required: true | |
default: 'minor' | |
type: choice | |
options: | |
- current | |
- patch | |
- minor | |
- major | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: fregante/setup-git-user@v2 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- run: yarn install | |
- run: yarn zx ./release.mjs -v $VERSION_TO_BUMP | |
env: | |
VERSION_TO_BUMP: ${{ inputs.versionToBump }} | |
GH_TOKEN: ${{ github.token }} | |
- run: yarn build | |
- run: yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
notify-slack-failure: | |
runs-on: ubuntu-latest | |
needs: [ release ] | |
if: failure() | |
steps: | |
- uses: voxmedia/github-action-slack-notify-build@v1 | |
with: | |
status: FAILED | |
channel: build_status | |
color: danger | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |