feat: update project to current tooling #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
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@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate_token.outputs.token }} | |
- name: Setup git user | |
uses: gotmax23/[email protected] | |
with: | |
global: true | |
bot: ${{ vars.RELEASE_BOT_ID }} | |
name: ${{ vars.RELEASE_BOT_NAME }} | |
- name: Setup | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: yarn | |
- name: Install | |
run: yarn install --immutable | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }} | |
run: yarn release |