Skip to content

Commit 6616329

Browse files
authored
Merge pull request #2 from Zonos/build/npm-release-package
feat(npm): release package
2 parents f8b50f0 + 3fd1856 commit 6616329

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

.github/workflows/release.yml renamed to .github/workflows/auto-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Release
1+
name: Auto Release
22

33
on:
44
push:
55
tags:
66
- "v*"
77

88
jobs:
9-
release:
10-
name: "Release"
9+
auto-release:
10+
name: "Auto Release"
1111
runs-on: "ubuntu-latest"
1212

1313
steps:
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
name: Publish
1+
name: Node.js Package
22

33
on:
44
push:
55
branches:
66
- main
77

88
jobs:
9-
publish:
9+
publish-gpr:
10+
needs: build
1011
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
contents: read
1115
steps:
1216
- uses: actions/checkout@v3
1317
- uses: actions/setup-node@v3
1418
with:
1519
node-version: 18
16-
registry-url: "https://registry.npmjs.org"
20+
registry-url: https://npm.pkg.github.com/
1721
cache: "yarn"
1822
- run: yarn install --frozen-lockfile
1923
- run: yarn build
20-
- run: cd dist && npm publish --access public
24+
- run: cd dist && npm publish
2125
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
26+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@zonos:registry=https://npm.pkg.github.com

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "zonos-typescript-sdk",
2+
"name": "@zonos/zonos-typescript-sdk",
33
"version": "0.0.1",
44
"private": true,
55
"dependencies": {
@@ -10,6 +10,9 @@
1010
"engines": {
1111
"node": "18"
1212
},
13+
"publishConfig": {
14+
"@zonos:registry": "https://npm.pkg.github.com"
15+
},
1316
"devDependencies": {
1417
"@babel/core": "^7.20.12",
1518
"@babel/preset-env": "^7.21.4",

0 commit comments

Comments
 (0)