-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25c8688
commit 4be40bb
Showing
3 changed files
with
38 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,42 @@ jobs: | |
with: | ||
fetch-tags: true | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Semantic Release | ||
id: semantic | ||
uses: cycjimmy/[email protected] | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
extra_plugins: | | ||
@semantic-release/git | ||
semantic-release-pub | ||
semantic_version: 24.2.0 | ||
|
||
- name: Bump version | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
env: | ||
NEW_RELEASE: ${{ steps.semantic.outputs.new_release_version }} | ||
run: | | ||
sed -i -E "s/^version: ([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\.]+)?)(\+([0-9]+))?$/version: $NEW_RELEASE+\$((\4+1))/e" pubspec.yaml | ||
- name: Commit and push changes | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RELEASE_NOTES: ${{ steps.semantic.outputs.new_release_notes}} | ||
NEW_RELEASE: ${{ steps.semantic.outputs.new_release_version }} | ||
HUSKY: 0 | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git add pubspec.yaml | ||
git commit -m "chore(release): $NEW_RELEASE [skip ci]\n\n$RELEASE_NOTES" --no-verify | ||
git push | ||
- name: Create Release | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RELEASE_NOTES: ${{ steps.semantic.outputs.new_release_notes }} | ||
NEW_RELEASE: ${{ steps.semantic.outputs.new_release_version }} | ||
PRERELEASE: ${{ contains(steps.semantic.outputs.new_release_channel, 'beta') }} | ||
run: gh release create v$NEW_RELEASE --notes $RELEASE_NOTES --target ${{ github.sha }} $([ "$PRERELEASE" = "true" ] && echo "-p") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters