Skip to content

fix: cleanup release workflow #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 27 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Release Please

name: Release Package
on:
push:
branches:
Expand All @@ -8,47 +7,47 @@ on:
permissions:
contents: write
pull-requests: write
issues: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
steps:
- uses: googleapis/release-please-action@v4
id: release
id: release-please
with:
config-file: .release-please-config.json
manifest-file: .release-please-manifest.json
release-type: node

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
publish-package:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_CONFIG_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install bun
if: ${{ steps.release.outputs.release_created }}
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install Node
if: ${{ steps.release.outputs.release_created }}
- name: Setup Node.js for npm
uses: actions/setup-node@v4
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_CONFIG_TOKEN }}
with:
node-version: 22
node-version: "latest"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
run: bun install
- name: 💫 Install dependencies
run: bun i

- name: Build package
if: ${{ steps.release.outputs.release_created }}
- name: 🏡 Build package
run: bun run build

- name: Creating .npmrc
if: ${{ steps.release.outputs.release_created }}
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_CONFIG_TOKEN }}

- name: Publish package
if: ${{ steps.release.outputs.release_created }}
- name: 🚀 Publish package
run: npm publish --access public
15 changes: 0 additions & 15 deletions .release-please-config.json

This file was deleted.

3 changes: 0 additions & 3 deletions .release-please-manifest.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prebuild": "rimraf dist",
"build": "bun build ./src/index.ts --outdir ./dist --target node && tsc --emitDeclarationOnly",
"rebuild": "bun run fetch:specs && bun run build",
"publish-package": "bun run build && bun publish --access=public",
"prepublishOnly": "bun run rebuild && bun run test",
"test": "bun test",
"fetch:specs": "bun run ./scripts/fetch-specs.ts && bun run format",
"build:docs": "bun run ./scripts/build-docs.ts",
Expand Down