Skip to content

Commit 5b7fefd

Browse files
ci(publish): standardize publish workflows
1 parent 9092e54 commit 5b7fefd

5 files changed

Lines changed: 8 additions & 33 deletions

File tree

.github/workflows/publish-github.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
- uses: actions/setup-node@v6
1919
with:
2020
node-version: '23.x'
21+
registry-url: 'https://npm.pkg.github.com'
2122
- name: Build and Publish Package
2223
uses: borales/actions-yarn@v5
2324
with:
2425
cmd: run publish:github
2526
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ jobs:
4444
- uses: actions/setup-node@v6
4545
with:
4646
node-version: '23.x'
47+
registry-url: 'https://registry.npmjs.org'
4748
- name: Build and Publish Package
4849
uses: borales/actions-yarn@v5
4950
with:
5051
cmd: run publish
5152
env:
52-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@
3131
"docs:test": "yarn workspace docusaurus start",
3232
"lint": "eslint .",
3333
"build": "rimraf -- ./out/ ./typings/ && tsc --project tsconfig.build.json && ts-node ./scripts/release-prep.ts",
34-
"build:github": "rimraf -- ./out/ ./typings/ && tsc --project tsconfig.build.json && ts-node ./scripts/release-prep-github.ts",
3534
"publish": "yarn build && cd out && npm login && npm publish",
36-
"publish:github": "yarn build:github && cd out && npm publish"
35+
"publish:github": "yarn build && cd out && npm publish"
3736
},
3837
"nyc": {
3938
"include": "src"
@@ -101,7 +100,9 @@
101100
"node": ">=18.0 <24.15 || >=25.0 <25.7"
102101
},
103102
"repository": {
104-
"url": "git+https://github.com/brandonbothell/popyt.git"
103+
"type": "git",
104+
"url": "git+https://github.com/brandonbothell/popyt.git",
105+
"directory": "."
105106
},
106107
"packageManager": "yarn@4.14.1"
107108
}

scripts/release-prep-github.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

scripts/release-prep.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ fs.writeFileSync(__dirname + '/../out/package.json', Buffer.from(JSON.stringify(
2020
fs.writeFileSync(__dirname + '/../out/version.txt', Buffer.from(sourceObj.version, 'utf-8'))
2121

2222
fs.cpSync(__dirname + '/../typings', __dirname + '/../out/declarations', { recursive: true })
23-
fs.copyFileSync(__dirname + '/../.npmrc', __dirname + '/../out/.npmrc')
2423
fs.copyFileSync(__dirname + '/../LICENSE', __dirname + '/../out/LICENSE')
2524
fs.copyFileSync(__dirname + '/../README.md', __dirname + '/../out/README.md')
2625
fs.copyFileSync(__dirname + '/../SECURITY.md', __dirname + '/../out/SECURITY.md')

0 commit comments

Comments
 (0)