Skip to content

Commit

Permalink
feat: calculate the version prior build with exec
Browse files Browse the repository at this point in the history
  • Loading branch information
puria committed Dec 3, 2024
1 parent 3655cef commit 4c87dd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ jobs:
node-version: latest
- run: bun install
- run: bun add -g semantic-release
- run: bun add -D @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github
- name: Calculate release version
run: |
VERSION=$(npx semantic-release --dry-run | grep -Po '(?<=The next release version is ).*')
echo "$VERSION" > VERSION
- run: bun add -D @semantic-release/exec @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github
- run: npx semantic-release --no-ci --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: bun run build
- run: cp dist/index.html pqspread.html
- uses: actions/upload-pages-artifact@v3
Expand Down
6 changes: 6 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"repositoryUrl": "[email protected]:forkbombeu/pqspread.git",
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo ${nextRelease.version} > VERSION"
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
Expand Down

0 comments on commit 4c87dd4

Please sign in to comment.