From be73c1f368583dc9c7242759952591c0bf99fb67 Mon Sep 17 00:00:00 2001 From: Casper Bloemendaal Date: Tue, 7 Nov 2023 15:58:38 +0100 Subject: [PATCH] try private publishing --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ddeeb4ea..1d44f4ad 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,3 +29,30 @@ jobs: - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + publish-private-package: + name: Build and publish NodeJS package + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://npm.pkg.github.com/ + + - run: npm i + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - run: npm run build + + - run: npm publish --new-version $TAG_NAME --tag latest --no-git-tag-version + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG_NAME: ${{ github.ref }} diff --git a/package.json b/package.json index 0369bf73..2a339430 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zonneplan/suncalc", - "version": "2.0.0", + "version": "2.0.1", "description": "A tiny JavaScript library for calculating sun/moon positions and phases.", "homepage": "https://github.com/zonneplan/suncalc", "keywords": [