Skip to content

Commit

Permalink
chore: publish on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 16, 2024
1 parent aa946f3 commit 4ff1423
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Release

permissions:
id-token: write
contents: write

on:
push:
tags:
- 'v*'
- v*

jobs:
release:
Expand All @@ -16,10 +17,22 @@ jobs:
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
cache: pnpm

- run: pnpm install

- run: npx changelogithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"prepublishOnly": "npm run build",
"build": "unbuild",
"stub": "unbuild --stub",
"release": "bumpp && npm publish",
"release": "bumpp",
"lint": "eslint .",
"test": "vitest"
},
Expand Down

0 comments on commit 4ff1423

Please sign in to comment.