Skip to content

Commit d73f7f0

Browse files
committed
Refactor GitHub Actions workflow for clarity
- Refactor GitHub Actions workflow configuration for clarity and cleanliness. - Improve indentation and spacing to enhance readability. - Retain crucial details on permissions and job setup for continued functionality. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
1 parent 12e87cb commit d73f7f0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

.github/workflows/publish.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Publish to GitHub Packages
33
on:
44
push:
55
tags:
6-
- 'v*.*.*' # v1.0.0 などのタグを push すると実行
6+
- 'v*.*.*'
77

88
permissions:
99
contents: read
10-
packages: write # これが必須
10+
packages: write
1111

1212
jobs:
1313
publish:
@@ -21,7 +21,6 @@ jobs:
2121
uses: actions/setup-node@v4
2222
with:
2323
node-version: 20
24-
# ここでregistry-urlを指定しておくとnpm/pnpmコマンドが自動でnpm.pkg.github.comを使用
2524
registry-url: 'https://npm.pkg.github.com'
2625

2726
- name: Install pnpm
@@ -34,10 +33,6 @@ jobs:
3433
run: pnpm run build
3534

3635
- name: Publish
37-
# publishConfigにregistryがある場合は --registry指定は不要。ただ明示的に指定するケースもある
3836
run: pnpm publish
3937
env:
40-
# GITHUB_TOKENは自動でActionsに渡されるが、pnpm/npmが使用するトークンはこの変数を参照
41-
# setup-node@v4 の registry-url 設定によって自動的に .npmrc が書き換わるので
42-
# NODE_AUTH_TOKEN を指定しなくても動く可能性はありますが、明示的に指定しておくのが無難です
4338
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)