Skip to content

v11.1.0

v11.1.0 #28

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Setup git
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "<>"
- name: Checkout to tag
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 0
- name: Parse version from tag
id: version
uses: release-kit/semver@v2
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Create a new build
run: |
yarn install --frozen-lockfile
yarn test
yarn build
- name: Set version from release
uses: reedyuk/npm-version@1.0.1
with:
version: ${{ steps.version.outputs.full }}
- name: Create NPM config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish latest
if: ${{ steps.version.outputs.prerelease == '' }}
run: npm publish
- name: Force update remote latest release branch
if: ${{ steps.version.outputs.prerelease == '' }}
run: git push origin ${{ github.event.release.tag_name }}:refs/heads/release/latest -f
- name: Force update remote major release branch
if: ${{ steps.version.outputs.prerelease == '' }}
run: git push origin ${{ github.event.release.tag_name }}:refs/heads/release/${{ steps.version.outputs.major }} -f
- name: Publish RC
if: ${{ steps.version.outputs.prerelease != '' }}
run: npm publish --tag ${{ steps.version.outputs.prerelease }}
- name: Force update remote latest release branch
if: ${{ steps.version.outputs.prerelease != '' }}
run: git push origin ${{ github.event.release.tag_name }}:refs/heads/release/latest-${{ steps.version.outputs.prerelease }} -f
- name: Force update remote major release branch
if: ${{ steps.version.outputs.prerelease != '' }}
run: git push origin ${{ github.event.release.tag_name }}:refs/heads/release/${{ steps.version.outputs.major }}-${{ steps.version.outputs.prerelease }} -f