chore: bump package manager version #185
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 Please | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
if: github.repository == 'poolifier/tatami-ng' | |
permissions: | |
contents: write | |
pull-requests: write | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
config-file: .github/release-please/config.json | |
manifest-file: .github/release-please/manifest.json | |
build-release: | |
needs: release-please | |
runs-on: ubuntu-latest | |
if: needs.release-please.outputs.release_created | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version-file: package.json | |
- name: Install Dependencies | |
run: bun install --ignore-scripts --frozen-lockfile | |
- name: Run Code Quality Checks | |
run: bun check:ci | |
- name: Bundle | |
run: bun bundle | |
- name: Run Tests | |
run: bun run test | |
publish-jsr: | |
needs: build-release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version-file: package.json | |
- name: Read package.json version | |
id: package-version | |
uses: jaywcjlove/github-action-package@main | |
- name: Publish Release | |
if: ${{ contains(steps.package-version.outputs.version, '-') == false }} | |
run: bunx jsr publish --allow-dirty | |
publish-npm: | |
needs: build-release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org/ | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version-file: package.json | |
- name: Bundle | |
run: bun bundle | |
- name: Read package.json version | |
id: package-version | |
uses: jaywcjlove/github-action-package@main | |
- name: Publish Release | |
if: ${{ contains(steps.package-version.outputs.version, '-') == false }} | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Release Candidate | |
if: ${{ contains(steps.package-version.outputs.version, '-rc') == true }} | |
run: npm publish --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Beta Release | |
if: ${{ contains(steps.package-version.outputs.version, '-beta') == true }} | |
run: npm publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Alpha Release | |
if: ${{ contains(steps.package-version.outputs.version, '-alpha') == true }} | |
run: npm publish --tag alpha | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |