Skip to content

Commit 1ff41e6

Browse files
committed
add publish from action
1 parent 6384ea3 commit 1ff41e6

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

.github/workflows/release.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: release
2+
on:
3+
push:
4+
tags: ["*"]
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v5
15+
with:
16+
node-version: latest
17+
- run: make deps
18+
- run: make build
19+
- run: make publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ $(DIST_FILES): $(SOURCE_FILES) package-lock.json package.json tsdown.config.ts
3535

3636
.PHONY: publish
3737
publish: node_modules
38-
git push -u --tags origin master
39-
npm publish
38+
npm publish --provenance --access public
4039

4140
.PHONY: update
4241
update: node_modules
@@ -48,14 +47,14 @@ update: node_modules
4847
.PHONY: path
4948
patch: node_modules lint test
5049
npx versions patch package.json package-lock.json
51-
@$(MAKE) --no-print-directory build publish
50+
git push -u --tags origin master
5251

5352
.PHONY: minor
5453
minor: node_modules lint test
5554
npx versions minor package.json package-lock.json
56-
@$(MAKE) --no-print-directory build publish
55+
git push -u --tags origin master
5756

5857
.PHONY: major
5958
major: node_modules lint test
6059
npx versions major package.json package-lock.json
61-
@$(MAKE) --no-print-directory build publish
60+
git push -u --tags origin master

0 commit comments

Comments
 (0)