Skip to content

Commit

Permalink
ci(publish): mix lerna & semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Oct 17, 2024
1 parent 24fa63e commit 6496bb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,17 @@ jobs:
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@users.noreply.github.com'
# - run: pnpm -r --parallel -c exec "jq '.release = input.release' package.json ../../package.json > tmp.json && mv tmp.json package.json"

# - run: pnpm -r --parallel --no-reporter-hide-prefix exec semantic-release

- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- if: github.ref == 'refs/heads/main'
run: pnpm lerna publish --no-private --conventional-commits --no-changelog --create-release github --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm lerna publish --no-private --conventional-commits --no-changelog --yes

- if: github.ref == 'refs/heads/next'
run: pnpm lerna publish --dist-tag next --exact --no-private --conventional-commits --conventional-prerelease --no-changelog --create-release github --yes
run: pnpm lerna publish --dist-tag next --exact --no-private --conventional-commits --conventional-prerelease --no-changelog --yes

- run: pnpm -r --parallel -c exec "jq '.release = input.release' package.json ../../package.json > tmp.json && mv tmp.json package.json"

- run: pnpm -r --parallel --no-reporter-hide-prefix exec semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec",
{
"prepareCmd": "pnpm version ${nextRelease.version} --no-git-tag-version",
"publishCmd": "pnpm publish --access public --tag ${nextRelease.channel} --no-git-checks"
}
],
"@semantic-release/github"
]
},
Expand Down

0 comments on commit 6496bb8

Please sign in to comment.