File tree Expand file tree Collapse file tree 3 files changed +26
-16
lines changed Expand file tree Collapse file tree 3 files changed +26
-16
lines changed Original file line number Diff line number Diff line change 1- name : publish
1+ name : publish-draft
22on :
33 push :
44 tags : # trigger the publish job on tag creation
@@ -23,24 +23,27 @@ jobs:
2323 runs-on : ubuntu-latest
2424 steps :
2525 - uses : actions/checkout@v4
26- - name : Install Dart
27- uses : dart-lang/setup-dart@v1
2826
2927 - name : Append GITHUB_RUN_NUMBER to version
30- run : |
31- VERSION=$(grep 'version:' pubspec.yaml | cut -d ' ' -f 2)
32- echo "Current version: $VERSION"
33- NEW_VERSION="$VERSION+${GITHUB_RUN_NUMBER}"
34- echo "New version: $NEW_VERSION"
35- sed -i "s/version: $VERSION/version: $NEW_VERSION/g" pubspec.yaml
36- cat pubspec.yaml
28+ run : ./update_version.sh
3729
38- - name : Dry run publish package
39- run : dart pub publish --dry-run # Perform a dry run first
30+ - name : Publish package
31+ 32+ with :
33+ credential : ${{ secrets.CREDENTIAL_JSON }}
34+ flutter_package : true
35+ skip_test : true
36+ dry_run : true
4037
41- # - name: Publish package
42- # run: |
43- # dart pub publish --force --token ${{ secrets.PUB_TOKEN }}
38+ - name : Git commit the updated pubspec.yaml
39+ run : |
40+ git config --global user.name "GitHub Actions"
41+ git config --global user.email "[email protected] " 42+ git add pubspec.yaml
43+ if [ -n "$(git status --porcelain)" ]; then
44+ git commit -m "chore: updated the version of pubspec.yaml"
45+ git push
46+ fi
4447
4548 deploy :
4649 needs : publish_pub_dev
Original file line number Diff line number Diff line change 11name : surrealdb_wasm
22description : Flutter SurrealDB WebAssembly(WASM) package
3- version : 0.7.0
3+ version : 0.7.0+1
44repository : https://github.com/limcheekin/surrealdb_wasm
55
66environment :
Original file line number Diff line number Diff line change 1+ VERSION=$( grep ' version:' pubspec.yaml | cut -d ' ' -f 2)
2+ echo " Current version: $VERSION "
3+ BASE_VERSION=$( echo $VERSION | cut -d' +' -f1)
4+ NEW_VERSION=" $BASE_VERSION +$GITHUB_RUN_NUMBER "
5+ echo " New version: $NEW_VERSION "
6+ sed -i " s/version: $VERSION /version: $NEW_VERSION /g" pubspec.yaml
7+ cat pubspec.yaml
You can’t perform that action at this time.
0 commit comments