diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml new file mode 100644 index 0000000..a4e2afb --- /dev/null +++ b/.github/workflows/release-preview.yml @@ -0,0 +1,15 @@ +name: Release preview +on: [pull_request] +jobs: + release-preview: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - run: bun install + # semantic-release dry-run workaround https://github.com/semantic-release/semantic-release/issues/1890#issuecomment-974512960 + - run: git checkout -b ${{ github.head_ref }} + - run: unset GITHUB_ACTIONS && bunx semantic-release-github-pr --debug \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fef059d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - run: bun install + - run: bunx semantic-release --debug \ No newline at end of file diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..1726b36 --- /dev/null +++ b/.releaserc @@ -0,0 +1,8 @@ +{ + "extends": "semantic-release-monorepo", + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/changelog" + ] +} diff --git a/package.json b/package.json index 214d112..4fb976b 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,17 @@ "private": true, "workspaces": { "packages": [ - "packages/*", - "pylon-template" + "packages/*" ] }, "devDependencies": { + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/commit-analyzer": "^13.0.0", + "@semantic-release/release-notes-generator": "^14.0.0", "@types/node": "^18.14.0", - "bun-types": "^1.0.14" + "bun-types": "^1.0.14", + "semantic-release": "^24.0.0", + "semantic-release-monorepo": "^8.0.2" }, "dependencies": {} }