Release: @latest production build #11
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: @latest production build' | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseType: | |
description: 'Release type' | |
required: true | |
type: choice | |
default: 'patch' | |
options: | |
- 'patch' # bug fixes | |
- 'minor' # new features, backwards compatible | |
- 'major' # breaking changes | |
runTests: | |
description: 'Run tests before releasing' | |
required: true | |
type: choice | |
default: 'true' | |
options: | |
- 'true' | |
- 'false' | |
# prevent concurrent releases | |
concurrency: | |
group: npm-release | |
cancel-in-progress: true | |
jobs: | |
# integration-tests: | |
# if: ${{ github.event.inputs.runTests == 'true' }} | |
# uses: ./.github/workflows/pr.yml | |
# secrets: inherit | |
version-and-release: | |
name: Release to NPM | |
# needs: integration-tests | |
runs-on: ubuntu-latest | |
outputs: | |
tagName: ${{ steps.npm-release.outputs.release_tag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Version and publish to npm | |
id: npm-release | |
uses: ./.github/actions/npm-release | |
with: | |
git_email: [email protected] | |
git_username: ${{ github.actor }} | |
releaseType: ${{ github.event.inputs.releaseType }} | |
npm_token: ${{ secrets.NPM_TOKEN }} | |
- run: echo "${{ steps.npm-release.outputs.release_tag }} was published" | |
build-and-publish-docs: | |
name: Build and publish docs to sdk-docs | |
needs: version-and-release | |
uses: ./.github/workflows/build-and-publish-docs.yml | |
secrets: inherit |