Skip to content

Merge pull request #252 from bitchcraft/fix/missing-build-step #4

Merge pull request #252 from bitchcraft/fix/missing-build-step

Merge pull request #252 from bitchcraft/fix/missing-build-step #4

Workflow file for this run

name: release
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
verify:
name: verify
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn
- name: Install
run: yarn install --immutable
- name: Typecheck
run: yarn check:types
- name: Tests
run: yarn test
release:
name: release
needs: verify
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- name: Generate bot token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- name: Setup git user
uses: gotmax23/set-bot-git-user-action@v1.2.0
with:
global: true
bot: ${{ vars.RELEASE_BOT_ID }}
name: ${{ vars.RELEASE_BOT_NAME }}
- name: Setup npm authn
run : echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH }}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}
- name: Setup
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
- name: Install
run: yarn install --immutable
- name: Build
env:
NODE_ENV: production
run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: yarn release