Skip to content

publish v2.1.0

publish v2.1.0 #2

Workflow file for this run

## ---------------------------------------------------
## |\---/|
## | ,_, | !! 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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
clean: true
fetch-depth: 1
token: ${{ secrets.BOT_GITHUB_TOKEN }}
ref: ${{ inputs.branch }}
- name: node > setup
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
clean: true
fetch-depth: 1
token: ${{ secrets.BOT_GITHUB_TOKEN }}
ref: v${{ inputs.version }}
- name: node > setup
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
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