Skip to content

Commit

Permalink
update: update release
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-Shen committed Feb 4, 2024
1 parent 8caeb03 commit 9c3eb07
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ jobs:
with:
node-version: 20.8.1

- name: Semantic release in dry-run mode
run: |
npm i -g semantic-release @semantic-release/github @semantic-release/changelog @semantic-release/git
echo "NEXT_VERSION=$(npx semantic-release --dry-run | grep -i 'the next release version is' | sed -E 's/.* ([0-9a-z.-]+)$/\1/')" >> $GITHUB_ENV
echo "$NEXT_VERSION"
- name: Semantic Release dry-run
uses: cycjimmy/semantic-release-action@v4
with:
dry_run: true
extra_plugins: |
@semantic-release/commit-analyzer
@semantic-release/exec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
28 changes: 28 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"branches": ["main", { "name": "alpha", "prerelease": true }],
"plugins": [
[
{
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
}
}
],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes}"
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo \"NEXT_VERSION=${nextRelease.version}\" >> $GITHUB_ENV"
}
]
]
}
5 changes: 0 additions & 5 deletions .releaserc.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/resolve_frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ $# -gt 1 ]; then
echo "alpha_version: $alpha_version" >> .VERSION
fi
else
if [ "$CURRENT_BRANCH" = "release" ]; then
if [ "$CURRENT_BRANCH" = "main" ]; then
url=$release_assets_url
else
url=$alpha_assets_url
Expand Down

0 comments on commit 9c3eb07

Please sign in to comment.