From 387aefd32afe884e63e1b166571da5dfe87759b4 Mon Sep 17 00:00:00 2001 From: Eric Satterwhite Date: Wed, 1 Apr 2026 16:00:18 -0500 Subject: [PATCH 1/2] chore(deps): codedependant/release-config-core@1.1.1 updates the release config for changes and bugfixes with recent versions of semantic-release --- package.json | 7 ++----- release.config.js | 27 +-------------------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index c10a498..4f20d7f 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "tap": "tap", "lint": "eslint ./", "lint:fix": "npm run lint -- --fix", - "release": "semantic-release", + "release": "npx semantic-release", "vuepress": "vuepress", "docs:dev": "vuepress dev gh-pages", "docs:build": "vuepress build gh-pages", @@ -101,15 +101,12 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@codedependant/release-config-npm": "^1.0.3", + "@codedependant/release-config-core": "^1.1.1", "@inquirer/testing": "^3.3.2", "@semantic-release/changelog": "^6.0.3", - "@semantic-release/exec": "^7.1.0", - "@semantic-release/git": "^10.0.1", "@vuepress/plugin-back-to-top": "^1.5.4", "eslint": "^10.1.0", "eslint-config-logdna": "^8.0.1", - "semantic-release": "^25.0.3", "tap": "^21.6.2", "vuepress": "^1.8.2" }, diff --git a/release.config.js b/release.config.js index 9f74d32..c86af99 100644 --- a/release.config.js +++ b/release.config.js @@ -1,31 +1,6 @@ 'use strict' -const config = require('@codedependant/release-config-npm') - module.exports = { - 'extends': '@codedependant/release-config-npm' + 'extends': '@codedependant/release-config-core' , 'branches': ['main'] -, 'plugins': remap(config.plugins) -} - -function remap(plugins) { - const remapped = [] - - for (const [name, config] of plugins) { - if (name === '@semantic-release/git') { - /* - remapped.push([ - '@semantic-release/exec', { - prepareCmd: 'npm run docs:build' - } - ]) - config.assets = [...config.assets, 'docs'] - */ - } - - remapped.push([name, config]) - } - - return remapped - } From bdb47745f50bde790b39c5bb4f1fba31e805d0c5 Mon Sep 17 00:00:00 2001 From: Eric Satterwhite Date: Wed, 1 Apr 2026 16:40:38 -0500 Subject: [PATCH 2/2] fix(ci): update the release to use github apps and npx This make it possible to publish to npm and github via the oauth apps and release rules --- .github/workflows/release.yml | 16 +++++++++++++--- package.json | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 343d6b5..a96ec5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,8 @@ jobs: run: npm test release: - name: release + name: Release + if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: test runs-on: ubuntu-latest permissions: @@ -38,20 +39,29 @@ jobs: issues: write pull-requests: write steps: + - name: Generate Token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.RELEASE_APP_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} - name: Checkout uses: actions/checkout@v4 with: + token: ${{ steps.app-token.outputs.token }} persist-credentials: false + - uses: actions/setup-node@v4 with: node-version: 24 - - run: npm install + - run: npm ci - name: Publish run: npm run release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} GIT_AUTHOR_NAME: 'Dependant Bot' GIT_AUTHOR_EMAIL: 'release-bot@codedependant.net' GIT_COMMITTER_NAME: 'Dependant Bot' GIT_COMMITTER_EMAIL: 'release-bot@codedependant.net' + NPM_TOKEN: 'false' diff --git a/package.json b/package.json index 4f20d7f..71f1fd5 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "lint": "eslint ./", "lint:fix": "npm run lint -- --fix", "release": "npx semantic-release", + "release:dry": "npm run release -- --no-ci --dry-run --branches=${BRANCH_NAME:-main}", "vuepress": "vuepress", "docs:dev": "vuepress dev gh-pages", "docs:build": "vuepress build gh-pages",