Skip to content

πŸš€ Release + Publish #1

πŸš€ Release + Publish

πŸš€ Release + Publish #1

Workflow file for this run

name: πŸš€ Release + Publish
on:
workflow_dispatch:
permissions:
id-token: write
contents: write
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: πŸ“₯ Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Required for fetching tags and generating release notes
fetch-depth: 0
- name: πŸ”§ Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
with:
bun-version-file: ".bun-version"
- name: πŸ“¦ Install dependencies
run: bun install --frozen-lockfile
- name: πŸ”§ Configure Git
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config --global push.followTags true
- name: πŸš€ Prepare release
run: bun run preversion
- name: πŸ“œ Generate changelog and release notes
run: |
bunx changelogen --release --push
bunx changelogen github release --token ${{ secrets.GITHUB_TOKEN }}
- name: πŸ› οΈ Build package
run: bun run build
- name: πŸ“¦ Publish to NPM Registry
run: |
bunx npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
bunx npm publish --provenance --access public