Release #7
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: | |
VERSION_BUMP: | |
description: 'The version bump' | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
default: minor | |
required: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: 1 | |
environment: release | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Setup Node.js version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Enable yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Configure git | |
run: | | |
git config user.name "Uphold" | |
git config user.email "[email protected]" | |
git config --global url.https://${{ secrets.RELEASE_GITHUB_TOKEN }}@github.com/.insteadOf https://github.com/ | |
- name: Generate release | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc | |
npm run release -- --increment "${{ github.event.inputs.VERSION_BUMP }}" -V |