From 7443a327a72b7ab4d0e84fbc63a5facaf457192b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Oct 2025 09:45:45 -0700 Subject: [PATCH 1/2] build: use release-please for releases --- .github/workflows/ci.yaml | 16 +------------ .github/workflows/release.yaml | 42 ++++++++++++++++++++++++++++++++++ .release-please-manifest.json | 3 +++ .releaserc.json | 3 --- package.json | 2 +- release-please-config.json | 10 ++++++++ 6 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/release.yaml create mode 100644 .release-please-manifest.json delete mode 100644 .releaserc.json create mode 100644 release-please-config.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1e1cf42..f730718 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [18, 20] + node: [18, 20, 22] steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v6 @@ -30,17 +30,3 @@ jobs: node-version: 22 - run: npm install - run: npm run lint - release: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - needs: [test, lint] - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-node@v6 - with: - node-version: 22 - - run: npm install - - run: npx semantic-release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..106855b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,42 @@ +on: + push: + branches: + - main +name: release +env: + FORCE_COLOR: 2 + NODE: 22 +jobs: + release-please: + if: github.repository == 'JustinBeckwith/yes-https' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + publish: + if: needs.release-please.outputs.release_created + runs-on: ubuntu-latest + needs: release-please + permissions: + contents: write + id-token: write + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 + with: + node-version: ${{ env.NODE }} + cache: npm + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm test + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..d6f5405 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "3.0.1" +} diff --git a/.releaserc.json b/.releaserc.json deleted file mode 100644 index 0a563ee..0000000 --- a/.releaserc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "branches": ["main"] -} diff --git a/package.json b/package.json index 225f69e..3544d97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yes-https", - "version": "0.0.0", + "version": "3.0.1", "description": "A simple utility to force https for connect based node.js apps.", "type": "module", "exports": "./lib/index.js", diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..4b41fe0 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,10 @@ +{ + "packages": { + ".": { + "release-type": "node", + "package-name": "yes-https", + "changelog-path": "CHANGELOG.md", + "extra-files": ["package.json"] + } + } +} From 7c2bb60bbcc4734a6e5438790affa78f3e9c5707 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Oct 2025 09:48:45 -0700 Subject: [PATCH 2/2] dunce --- .github/workflows/release.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 106855b..d2f04f4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,5 +38,3 @@ jobs: - run: npm ci - run: npm test - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}