From 59670cd035c2ac220793d7aa61a4987ea9ba6866 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Mon, 14 Aug 2023 16:44:47 -0700 Subject: [PATCH 1/2] chore: turn on autopublish --- .github/workflows/release.yml | 43 ++++++++++++----------------------- package.json | 3 ++- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b120245..3978bb1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,7 +169,7 @@ jobs: RELEASE_COMMENT_ID: ${{ needs.release.outputs.comment-id }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - npm exec --offline -- template-oss-release-manager --lockfile=false --publish=false + npm exec --offline -- template-oss-release-manager --lockfile=false --publish=true npm run rp-pull-request --ignore-scripts --if-present - name: Commit id: commit @@ -318,41 +318,26 @@ jobs: defaults: run: shell: bash + permissions: + deployments: write + id-token: write steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ fromJSON(needs.release.outputs.release).tagName }} - name: Setup Node uses: actions/setup-node@v3 with: node-version: 18.x - name: Install npm@latest - run: npm i --prefer-online --no-fund --no-audit -g npm@latest - - name: npm Version - run: npm -v - - name: View in Registry run: | - EXIT_CODE=0 - - function is_published { - if npm view "$@" --loglevel=error > /dev/null; then - echo 0 - else - echo 1 - fi - } - - for release in $(echo '${{ needs.release.outputs.releases }}' | jq -r '.[] | @base64'); do - name=$(echo "$release" | base64 --decode | jq -r .pkgName) - version=$(echo "$release" | base64 --decode | jq -r .version) - spec="$name@$version" - status=$(is_published "$spec") - if [[ "$status" -eq 1 ]]; then - echo "$spec ERROR" - EXIT_CODE=$status - else - echo "$spec OK" - fi - done - - exit $EXIT_CODE + npm i --prefer-online --no-fund --no-audit -g npm@latest + npm config set '//registry.npmjs.org/:_authToken'=\${PUBLISH_TOKEN} + - name: Publish + env: + PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} + run: npm publish --provenance post-release-integration: needs: [ release, release-integration ] diff --git a/package.json b/package.json index c9b474a..6362bfc 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0" + "version": "4.18.0", + "publish": true } } From ec603fd26c2290894a47e26604e9bd32310e7bac Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Mon, 14 Aug 2023 16:45:08 -0700 Subject: [PATCH 2/2] fix: drop node14 support BREAKING CHANGE: support for node 14 has been removed --- .github/workflows/ci-release.yml | 4 +--- .github/workflows/ci.yml | 4 +--- package.json | 10 ++++++++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 88e7905..380de5e 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -117,9 +117,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 14.17.0 - - 14.x - - 16.13.0 + - 16.14.0 - 16.x - 18.0.0 - 18.x diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b8d4a8..06966af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,9 +59,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 14.17.0 - - 14.x - - 16.13.0 + - 16.14.0 - 16.x - 18.0.0 - 18.x diff --git a/package.json b/package.json index 6362bfc..fdc6a96 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "homepage": "https://github.com/npm/npm-package-arg", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^16.14.0 || >=18.0.0" }, "tap": { "branches": 97, @@ -55,6 +55,12 @@ "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "version": "4.18.0", - "publish": true + "publish": true, + "ciVersions": [ + "16.14.0", + "16.x", + "18.0.0", + "18.x" + ] } }