Skip to content

Commit d96bd99

Browse files
committed
Update version to 1.0.1 and add npm publishing workflow
1 parent 5a44905 commit d96bd99

2 files changed

Lines changed: 35 additions & 3 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [created]
66

77
jobs:
8-
publish:
8+
publish-github:
99
runs-on: ubuntu-latest
1010
permissions:
1111
id-token: write
@@ -35,4 +35,36 @@ jobs:
3535
- name: Publish to GitHub Package Registry
3636
run: npm publish --access=restricted
3737
env:
38-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
publish-npm:
41+
runs-on: ubuntu-latest
42+
permissions:
43+
id-token: write
44+
packages: write
45+
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v4
49+
50+
- name: Set up Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '20'
54+
registry-url: 'https://registry.npmjs.org/'
55+
56+
- name: Setup Bun
57+
uses: oven-sh/setup-bun@v2.0.2
58+
with:
59+
bun-version: 'latest'
60+
61+
- name: Install dependencies
62+
run: bun install
63+
64+
- name: Build package
65+
run: bun run build
66+
67+
- name: Publish to npm
68+
run: npm publish --access=public
69+
env:
70+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@threadmc/minecraft-api",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "An advanced Minecraft API client for interacting with piston-meta, minecraft servers, and more",
55
"type": "module",
66
"main": "dist/client.js",

0 commit comments

Comments
 (0)