v5.24.0 #18
Workflow file for this run
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 | |
on: | |
push: | |
tags: | |
- v*.*.* | |
env: | |
HUSKY: '0' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: yarn | |
registry-url: https://registry.npmjs.org | |
- name: yarn install | |
run: yarn install --frozen-lockfile | |
- name: yarn test | |
run: yarn test | |
- name: Deploy to Heroku | |
env: | |
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }} | |
HEROKU_APP_NAME: release-drafter | |
run: | | |
git fetch origin master | |
git push https://heroku:$HEROKU_API_TOKEN@git.heroku.com/$HEROKU_APP_NAME.git origin/master:master --force | |
- name: yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }} | |
run: yarn publish --access public | |
- name: version | |
id: version | |
run: | | |
tag=${GITHUB_REF/refs\/tags\//} | |
version=${tag#v} | |
major=${version%%.*} | |
echo "tag=${tag}" >> $GITHUB_OUTPUT | |
echo "version=${version}" >> $GITHUB_OUTPUT | |
echo "major=${major}" >> $GITHUB_OUTPUT | |
- uses: release-drafter/release-drafter@master | |
with: | |
version: ${{ steps.version.outputs.version }} | |
publish: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: force update major tag | |
run: | | |
git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f | |
git push origin refs/tags/v${{ steps.version.outputs.major }} -f |