-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed workflow to properly update version (#52)
- Loading branch information
1 parent
62a27ad
commit 87b3b8e
Showing
3 changed files
with
19 additions
and
12 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 |
---|---|---|
|
@@ -91,6 +91,10 @@ jobs: | |
git config --local user.name 'hyper-sdk-app[bot]' | ||
git config --local user.email '163947841+hyper-sdk-app[bot]@users.noreply.github.com' | ||
- name: Stash changes | ||
run: git reset --hard | ||
|
||
- name: Update version in pubspec.yaml | ||
run: | | ||
# Update the version in pubspec.yaml | ||
|
@@ -101,22 +105,25 @@ jobs: | |
git add pubspec.yaml | ||
git add ios/hypersdkflutter.podspec | ||
git commit -m "chore: bump version to ${{ env.new_version }}" | ||
git push origin main | ||
shell: bash | ||
|
||
- name: Stash changes | ||
run: git reset --hard | ||
- name: Publish to pub.dev | ||
uses: k-paxian/[email protected] | ||
with: | ||
credentialJson: ${{ secrets.PUB_PUBLISH_TOKEN }} | ||
flutter: true | ||
skipTests: true | ||
|
||
- name: Tag the new version | ||
- name: Create tag for new version | ||
run: | | ||
git tag "v${{ env.new_version }}" | ||
git push origin "v${{ env.new_version }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish to pub.dev | ||
uses: k-paxian/[email protected] | ||
with: | ||
credentialJson: ${{ secrets.PUB_PUBLISH_TOKEN }} | ||
flutter: true | ||
skipTests: true | ||
- name: Push release commit | ||
run: | | ||
git push origin main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
shell: bash |
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