From 226dec6f17e48809d70a09f0a423de0408386bea Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 28 Jun 2024 23:48:16 -0600 Subject: [PATCH] chore: Initial release automation prep. --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++ CHANGELOG.md | 0 package.json | 49 +---------------------------------- 3 files changed, 36 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d2c33d3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +on: + push: + branches: + - main + +permissions: {} + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.ZMK_STUDIO_RELEASE_TOKEN }} + release-type: node + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + with: + submodules: true + - uses: actions/setup-node@v4 + with: + node-version: 12 + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.ZMK_STUDIO_NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json index ca42498..ff62fe0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "zmk-studio-ts-client", + "name": "@zmkfirmware/zmk-studio-ts-client", "version": "0.0.1-development", "description": "RPC client library for interacting with ZMK Studio enabled keyboards", "type": "module", @@ -23,7 +23,6 @@ "clean": "rm -rf ./lib/", "cm": "cz", "lint": "eslint ./src/ --fix", - "semantic-release": "semantic-release", "test:watch": "jest --watch", "test": "jest --coverage", "typecheck": "tsc --noEmit" @@ -72,7 +71,6 @@ "jest": "^29.0.0", "lint-staged": "^13.2.1", "prettier": "^2.2.1", - "semantic-release": "^21.0.1", "ts-jest": "^29.0.0", "ts-node": "^10.2.1", "typescript": "^4.2.4", @@ -86,50 +84,5 @@ }, "lint-staged": { "*.ts": "eslint --cache --cache-location .eslintcache --fix" - }, - "release": { - "branches": [ - "main" - ], - "plugins": [ - [ - "@semantic-release/commit-analyzer", - { - "preset": "conventionalcommits", - "releaseRules": [ - { - "type": "build", - "scope": "deps", - "release": "patch" - } - ] - } - ], - [ - "@semantic-release/release-notes-generator", - { - "preset": "conventionalcommits", - "presetConfig": { - "types": [ - { - "type": "feat", - "section": "Features" - }, - { - "type": "fix", - "section": "Bug Fixes" - }, - { - "type": "build", - "section": "Dependencies and Other Build Updates", - "hidden": false - } - ] - } - } - ], - "@semantic-release/npm", - "@semantic-release/github" - ] } }