Skip to content

Commit 70a7846

Browse files
committed
add release script
1 parent f51cb6b commit 70a7846

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish package to GitHub Packages
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v5
13+
# Setup .npmrc file to publish to GitHub Packages
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '22.x'
17+
registry-url: 'https://npm.pkg.github.com'
18+
scope: '@mc-zuri'
19+
- run: npm publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.TOKEN }}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"name": "prismarine-registry",
2+
"name": "@mc-zuri/prismarine-registry",
33
"version": "1.11.0",
44
"description": "Prismarine Registry",
55
"main": "lib/index.js",
6+
"publishConfig": {
7+
"registry": "https://npm.pkg.github.com"
8+
},
69
"scripts": {
710
"test": "mocha --reporter spec --bail --exit",
811
"pretest": "npm run lint",
@@ -11,7 +14,7 @@
1114
},
1215
"repository": {
1316
"type": "git",
14-
"url": "git+https://github.com/PrismarineJS/prismarine-registry.git"
17+
"url": "https://github.com/mc-zuri/prismarine-registry.git"
1518
},
1619
"keywords": [
1720
"prismarine",

0 commit comments

Comments
 (0)