New release version #196
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: New release version | |
on: | |
workflow_dispatch: | |
inputs: | |
rc_version_tag: | |
description: "For a release candidate, provide a name that will be used as version tag" | |
required: false | |
type: string | |
rc_version_name: | |
description: "For a release candidate, provide a name that will be used as version name" | |
required: false | |
type: string | |
version_type: | |
description: "For a latest release, select the version type" | |
required: false | |
type: choice | |
default: "patch" | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
rc: | |
if: ${{ github.ref_name != 'master' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
check-latest: true | |
registry-url: "https://registry.npmjs.org" | |
always-auth: true | |
- name: Prepare package | |
run: | | |
git checkout ${{ github.ref_name }} | |
bash ./scripts/pre-release.sh | |
- name: Publish to npm | |
run: yarn publish --tag ${{ inputs.rc_version_tag }} --new-version ${{ inputs.rc_version_name }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
latest: | |
if: ${{ github.ref_name == 'master' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
check-latest: true | |
registry-url: "https://registry.npmjs.org" | |
always-auth: true | |
- name: Prepare package | |
run: bash ./scripts/pre-release.sh | |
- name: Standard version | |
run: | | |
yarn release --release-as ${{ inputs.version_type }} | |
git push --follow-tags origin master | |
- name: Publish to npm | |
run: yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Create release with notes | |
run: bash ./scripts/release-notes.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |