Skip to content

New release version #88

New release version

New release version #88

Workflow file for this run

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
- name: Prepare package
run: |
git checkout ${{ github.ref_name }}
bash ./scripts/pre-release.sh
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
always-auth: true
- 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
- 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
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
always-auth: true
- 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 }}