Release #24
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
dryRun: | |
description: 'Do a dry run to preview instead of a real release' | |
required: true | |
default: 'true' | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Needed for lerna version to determine last tag | |
- name: Fetch | |
run: git fetch --prune --unshallow --tags | |
- name: Cache Node Modules | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn | |
- name: Test | |
run: yarn test | |
- name: Configure Git User | |
run: | | |
git config --global user.name amplitude-sdk-bot | |
git config --global user.email [email protected] | |
- name: Setup NPM Token | |
if: ${{ github.event.inputs.dryRun == 'false'}} | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | |
- name: Release (Dry Run) | |
if: ${{ github.event.inputs.dryRun == 'true'}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn release --dry-run --ci --npm.skipChecks | |
- name: Release | |
if: ${{ github.event.inputs.dryRun == 'false'}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn release --ci --npm.skipChecks |