Skip to content

Commit 4bfb3ea

Browse files
authored
ci: fix publish npm action (#6)
Fixes the publish npm action.
1 parent 76dc672 commit 4bfb3ea

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Release
22

33
on:
4-
push:
5-
tags: [v*]
4+
release:
5+
types: [created]
66

77
jobs:
88
build:
@@ -36,8 +36,6 @@ jobs:
3636
steps:
3737
- name: Checkout
3838
uses: actions/checkout@v3
39-
with:
40-
fetch-depth: 0
4139

4240
- name: Setup PNPM
4341
uses: pnpm/action-setup@v2
@@ -49,11 +47,12 @@ jobs:
4947
with:
5048
node-version: 18
5149
cache: "pnpm"
50+
registry-url: "https://registry.npmjs.org"
5251

5352
- name: Install Dependencies
5453
run: pnpm install --frozen-lockfile
5554

5655
- name: Release binary
57-
run: pnpm publish --no-git-checks
56+
run: npm publish
5857
env:
5958
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

cmd/use_correct_pm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
var rootCmd = &cobra.Command{
1515
Use: "use-correct-pm",
16-
Version: "1.0.1",
16+
Version: "1.0.2",
1717
Short: "A simple check of the usage of the correct package manager",
1818
Long: `Check if the correct package manager is used.
1919
Available are 'NPM', 'Yarn' and 'PNPM'.`,

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "use-correct-pm",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A simple check of the usage of the correct package manager.",
55
"keywords": [
66
"package-manager",
@@ -15,6 +15,9 @@
1515
},
1616
"license": "MIT",
1717
"author": "Alexander Böhm <[email protected]>",
18+
"files": [
19+
"bin"
20+
],
1821
"scripts": {
1922
"postinstall": "is-ci || go-npm install",
2023
"prepare": "husky install",

0 commit comments

Comments
 (0)