publish v2.1.0-experimental.1 #1
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
## --------------------------------------------------- | |
## |\---/| | |
## | ,_, | !! DO NOT MODIFY !! | |
## \_`_/-..----. file managed by `whiskers` | |
## ___/ ` ' ,""+ \ | |
## (__...' __\ |`.___.'; | |
## (_,...'(_,.`__)/'.....+ | |
## --------------------------------------------------- | |
name: publish | |
run-name: publish v${{ inputs.version }} | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: The branch of the build. Used to find artifacts and tag. | |
required: true | |
release_type: | |
description: The type of release. | |
required: true | |
type: choice | |
options: | |
- experimental | |
- stable | |
default: experimental | |
version: | |
description: "The version of this release. Omit 'v' prefix. Example: '1.0.1-experimental.1'." | |
required: true | |
jobs: | |
version_bump: | |
name: version bump | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: git > checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
with: | |
clean: true | |
fetch-depth: 1 | |
token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
ref: ${{ inputs.branch }} | |
- name: node > setup | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version-file: .nvmrc | |
cache: yarn | |
- name: yarn > install | |
run: yarn install --frozen-lockfile | |
- name: yarn > bump version | |
run: yarn run release:version:bump ${{ inputs.version }} | |
- name: git > commit version bump | |
uses: EndBug/add-and-commit@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081 | |
with: | |
default_author: github_actions | |
message: bump version to ${{ inputs.version }} | |
push: true | |
tag: v${{ inputs.version }} | |
publish: | |
name: publish | |
runs-on: ubuntu-latest | |
needs: | |
- version_bump | |
steps: | |
- name: git > checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
with: | |
clean: true | |
fetch-depth: 1 | |
token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
ref: v${{ inputs.version }} | |
- name: node > setup | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version-file: .nvmrc | |
cache: yarn | |
- name: yarn > install | |
run: yarn install --frozen-lockfile | |
- name: ci > download artifacts | |
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e | |
with: | |
workflow: build.yaml | |
workflow_conclusion: success | |
branch: ${{ inputs.branch }} | |
- name: yarn > publish (experimental) | |
if: inputs.release_type == 'experimental' | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: yarn run release:publish:experimental | |
- name: yarn > publish (stable) | |
if: inputs.release_type == 'stable' | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: yarn run release:publish:stable |