diff --git a/.github/workflows/ci.yml b/.github/workflows/publish.yml similarity index 88% rename from .github/workflows/ci.yml rename to .github/workflows/publish.yml index c968d21..5c5cd09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/publish.yml @@ -5,6 +5,9 @@ on: - "**" tags: - "v*" +permissions: + id-token: write # Required for OIDC + contents: read jobs: build: runs-on: ubuntu-latest @@ -18,7 +21,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 - name: Make version run: make -v - name: Install dependencies @@ -49,7 +52,7 @@ jobs: path: . - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 - run: npm i - run: npm run test release: @@ -63,9 +66,7 @@ jobs: path: . - uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '24' registry-url: 'https://registry.npmjs.org/' - run: npm pack - - run: npm publish *.tgz - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm publish *.tgz --access public diff --git a/package.json b/package.json index 5879ce7..15bfaca 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,16 @@ { "name": "@tracsystems/blake3", - "version": "0.0.15", + "version": "0.0.16", "scripts": { "build": "make", "clean": "make clean", "build:docker": "docker build -t blake3-build . && docker run --rm -v $(pwd):/build blake3-build bash -c 'npm install && npm run build'", "test": "mocha \"test/**/*.test.js\"" }, + "repository": { + "type": "git", + "url": "https://github.com/Trac-Systems/blake3" + }, "react-native": "dist/wasm/blake3_rn.js", "main": "dist/wasm/blake3.js", "browser": "dist/wasm/blake3.mjs", @@ -27,5 +31,9 @@ "devDependencies": { "chai": "^5.2.1", "mocha": "^11.7.1" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" } }