feat: update package name and improve build workflow for versioned releases
This commit is contained in:
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@@ -3,6 +3,7 @@ name: Build WASM
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
tags: ['v*']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -94,3 +95,27 @@ jobs:
|
|||||||
dist/anisette_rs.node.js
|
dist/anisette_rs.node.js
|
||||||
dist/anisette_rs.node.wasm
|
dist/anisette_rs.node.wasm
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
registry-url: 'https://npm.pkg.github.com'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
working-directory: js/
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build TypeScript
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
working-directory: js/
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Publish to GitHub Packages
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
working-directory: js/
|
||||||
|
run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "anisette-js",
|
"name": "@lbr77/anisette-js",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "High-level JavaScript/TypeScript API for Apple Anisette headers via WASM",
|
"description": "High-level JavaScript/TypeScript API for Apple Anisette headers via WASM",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"default": "./src/browser.ts",
|
"default": "./src/index.ts",
|
||||||
"node": "./src/index.ts"
|
"browser": "./src/browser.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
@@ -26,5 +26,13 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^25.3.2"
|
"@types/node": "^25.3.2"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"registry": "https://npm.pkg.github.com",
|
||||||
|
"access": "restricted"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/lbr77/anisette-js.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user