Skip to content

do semantic release dry run #13

do semantic release dry run

do semantic release dry run #13

name: Release
on:
# pull_request:
push:
branches:
- main
paths:
# This is fine for merging PR which is a push to main because changesets updates package's changelog and package.json to trigger this
- 'packages/react-router-busy/**'
permissions:
contents: read # for checkout
# Don't run publish multiple times at once
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
quality:
if: github.repository == 'bitofbreeze/mono'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .
validate:
needs: [quality]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Bun
uses: oven-sh/[email protected]
with:
bun-version: latest
- name: Install dependencies (`npm ci`)
run: bun install --frozen-lockfile
- name: Test
run: bun test --filter react-router-busy --coverage
# Build checks types so no need for separate typecheck step
- name: Build
run: bun --filter react-router-busy build
- name: Check exports
run: bun --filter react-router-busy check-exports
release:
# Only upsert release PR when pushing (to main)
if: github.event_name == 'push'
needs: [validate]
runs-on: ubuntu-latest
# https://github.com/changesets/action/issues/179#issuecomment-1139116421
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
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Bun
uses: oven-sh/[email protected]
with:
bun-version: latest
- name: Install dependencies (`npm ci`)
run: bun install --frozen-lockfile
# Note we have to toggle Workflow permissions > Allow GitHub Actions to create and approve pull requests in https://github.com/bitofbreeze/mono/settings/actions
# Even with permissions above https://github.com/orgs/community/discussions/27689#discussioncomment-5707424
# Could avoid this with personal access token https://microsoft.github.io/beachball/concepts/ci-integration.html#authentication
- name: Release
uses: cycjimmy/semantic-release-action@v4
with:
working_directory: ./packages/react-router-busy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}