From 14c00ad89a54b6301be7fdeb261cf22c32a60568 Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Thu, 15 Feb 2024 10:30:46 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20(release):=20Added=20semantic=20?= =?UTF-8?q?release=20setup=20+=20test=20in=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 21 +++++++++++++++++ actions/setup-toolchain-composite/action.yml | 4 ++-- package.json | 1 + packages/core/.releaserc | 16 ------------- packages/core/release.config.cjs | 3 +++ packages/signer/.releaserc | 16 ------------- packages/signer/release.config.cjs | 3 +++ packages/trusted-apps/.releaserc | 16 ------------- packages/trusted-apps/release.config.cjs | 3 +++ packages/ui/.releaserc | 16 ------------- packages/ui/release.config.cjs | 3 +++ pnpm-lock.yaml | 3 +++ release.config.cjs | 24 ++++++++++++++++++++ turbo.json | 2 +- 14 files changed, 64 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 packages/core/.releaserc create mode 100644 packages/core/release.config.cjs delete mode 100644 packages/signer/.releaserc create mode 100644 packages/signer/release.config.cjs delete mode 100644 packages/trusted-apps/.releaserc create mode 100644 packages/trusted-apps/release.config.cjs delete mode 100644 packages/ui/.releaserc create mode 100644 packages/ui/release.config.cjs create mode 100644 release.config.cjs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..395c73a98 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: "release" +on: + push: + branches: + - feature/dsdk-66-changelog + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./actions/setup-toolchain-composite + - name: setup + run: | + pnpm i + pnpm build + - name: release + run: pnpm release + env: + GITHUB_TOKEN: ${{ github.token }} + # NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} diff --git a/actions/setup-toolchain-composite/action.yml b/actions/setup-toolchain-composite/action.yml index ca73c97d5..02ee807d5 100644 --- a/actions/setup-toolchain-composite/action.yml +++ b/actions/setup-toolchain-composite/action.yml @@ -5,9 +5,9 @@ runs: using: "composite" steps: - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - uses: pnpm/action-setup@v2 name: Install pnpm diff --git a/package.json b/package.json index 5940f542b..57b9ec4f3 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "release": "pnpm turbo run release --log-order=grouped" }, "devDependencies": { + "@semantic-release/npm": "^11.0.2", "@types/jest": "^29.5.11", "@types/node": "^20.10.6", "eslint": "^8.56.0", diff --git a/packages/core/.releaserc b/packages/core/.releaserc deleted file mode 100644 index 55ec08f83..000000000 --- a/packages/core/.releaserc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "branches": [ - { - "name": "main" - }, - { - "name": "feature/dsdk-66-changelog", - "channel": "wip", - "prerelease": true - } - ], - "extends": [ - "semantic-release-monorepo", - "semantic-release-config-gitmoji" - ] -} diff --git a/packages/core/release.config.cjs b/packages/core/release.config.cjs new file mode 100644 index 000000000..2c4ba4b8f --- /dev/null +++ b/packages/core/release.config.cjs @@ -0,0 +1,3 @@ +const config = require("../../release.config.cjs"); + +module.exports = config; diff --git a/packages/signer/.releaserc b/packages/signer/.releaserc deleted file mode 100644 index 55ec08f83..000000000 --- a/packages/signer/.releaserc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "branches": [ - { - "name": "main" - }, - { - "name": "feature/dsdk-66-changelog", - "channel": "wip", - "prerelease": true - } - ], - "extends": [ - "semantic-release-monorepo", - "semantic-release-config-gitmoji" - ] -} diff --git a/packages/signer/release.config.cjs b/packages/signer/release.config.cjs new file mode 100644 index 000000000..2c4ba4b8f --- /dev/null +++ b/packages/signer/release.config.cjs @@ -0,0 +1,3 @@ +const config = require("../../release.config.cjs"); + +module.exports = config; diff --git a/packages/trusted-apps/.releaserc b/packages/trusted-apps/.releaserc deleted file mode 100644 index 55ec08f83..000000000 --- a/packages/trusted-apps/.releaserc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "branches": [ - { - "name": "main" - }, - { - "name": "feature/dsdk-66-changelog", - "channel": "wip", - "prerelease": true - } - ], - "extends": [ - "semantic-release-monorepo", - "semantic-release-config-gitmoji" - ] -} diff --git a/packages/trusted-apps/release.config.cjs b/packages/trusted-apps/release.config.cjs new file mode 100644 index 000000000..2c4ba4b8f --- /dev/null +++ b/packages/trusted-apps/release.config.cjs @@ -0,0 +1,3 @@ +const config = require("../../release.config.cjs"); + +module.exports = config; diff --git a/packages/ui/.releaserc b/packages/ui/.releaserc deleted file mode 100644 index 55ec08f83..000000000 --- a/packages/ui/.releaserc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "branches": [ - { - "name": "main" - }, - { - "name": "feature/dsdk-66-changelog", - "channel": "wip", - "prerelease": true - } - ], - "extends": [ - "semantic-release-monorepo", - "semantic-release-config-gitmoji" - ] -} diff --git a/packages/ui/release.config.cjs b/packages/ui/release.config.cjs new file mode 100644 index 000000000..2c4ba4b8f --- /dev/null +++ b/packages/ui/release.config.cjs @@ -0,0 +1,3 @@ +const config = require("../../release.config.cjs"); + +module.exports = config; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4004faf3f..0919ea96a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@semantic-release/npm': + specifier: ^11.0.2 + version: 11.0.2(semantic-release@23.0.2) '@types/jest': specifier: ^29.5.11 version: 29.5.11 diff --git a/release.config.cjs b/release.config.cjs new file mode 100644 index 000000000..d52cebd14 --- /dev/null +++ b/release.config.cjs @@ -0,0 +1,24 @@ +/** + * @type {import('semantic-release').GlobalConfig} + */ +module.exports = { + branches: [ + { + name: "main", + }, + { + name: "feature/dsdk-66-changelog", + channel: "channel-wip", + prerelease: "wip", + }, + ], + extends: ["semantic-release-monorepo", "semantic-release-config-gitmoji"], + plugins: [ + [ + "@semantic-release/npm", + { + npmPublish: false, + }, + ], + ], +}; diff --git a/turbo.json b/turbo.json index 0d512e17a..afcc9e53d 100644 --- a/turbo.json +++ b/turbo.json @@ -32,7 +32,7 @@ "dependsOn": ["build", "^typecheck"] }, "release": { - "dependsOn": ["^release"] + "dependsOn": ["build", "^release"] } } }