From b9c50e3d7c2c6ba0d638e33edcb28c3520604340 Mon Sep 17 00:00:00 2001 From: Tiago Botelho Date: Fri, 2 Dec 2022 12:54:53 +0000 Subject: [PATCH 1/3] Publish package to GHPR Since there are a few repositories in npm that are currently consuming GitHub scoped packages directly from GHPR, it'd be convenient if we could publish the latest version of our packages to both registries. --- .github/workflows/publish.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c1b229d..d5a3d25 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,3 +22,24 @@ jobs: - run: npm whoami; npm --ignore-scripts publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-github: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://npm.pkg.github.com + cache: npm + - run: npm ci + - run: npm test + - run: npm version ${TAG_NAME} --git-tag-version=false + env: + TAG_NAME: ${{ github.event.release.tag_name }} + - run: npm whoami; npm --ignore-scripts publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ccbdafe146dd48a55d44012d0b1ff991fc3397ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=B8ller=20Ellehauge?= Date: Tue, 6 Dec 2022 13:44:58 +0100 Subject: [PATCH 2/3] chore: Change version permanent development --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b7962b4..997778c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@github/prettier-config", - "version": "0.0.4", + "version": "0.0.0-development", "description": "Prettier config used at GitHub", "repository": "github/prettier-config", "keywords": [ From d760b3ae18db240365f8406545b89ef4724b31aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=B8ller=20Ellehauge?= Date: Tue, 6 Dec 2022 13:45:30 +0100 Subject: [PATCH 3/3] chore: remove postpublish in scripts in favor of explicit workflow --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 997778c..b71ecaa 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,7 @@ "main": "index.js", "scripts": { "test:update": "prettier --config ./index.js --write examples/", - "test": "prettier --config ./index.js --check examples/", - "postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'" + "test": "prettier --config ./index.js --check examples/" }, "devDependencies": { "prettier": "^2.8.0"