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/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"] } } }