-
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.
Update build numbers to 200 + Run for new repository and actions
- Loading branch information
Danni Silk
committed
Aug 4, 2024
1 parent
7dbe68b
commit b326ac9
Showing
1 changed file
with
14 additions
and
9 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 |
---|---|---|
|
@@ -9,6 +9,11 @@ on: | |
type: boolean | ||
default: true | ||
|
||
# Enter in project properties here | ||
env: | ||
# Bumping version code to 200 + run number - this will indicate builds since Open Source | ||
BUILD_NUMBER: 200 + ${{ github.run_number }} | ||
|
||
jobs: | ||
job-linux: | ||
runs-on: ubuntu-latest | ||
|
@@ -36,7 +41,7 @@ jobs: | |
- name: Generate app build name | ||
shell: bash | ||
run: echo "##[set-output name=name;]$(echo sweet_$GITHUB_RUN_NUMBER)" | ||
run: echo "##[set-output name=name;]$(echo sweet_$BUILD_NUMBER)" | ||
id: app_build | ||
|
||
- name: Building ${{ steps.app_build.outputs.name }} Linux | ||
|
@@ -77,14 +82,14 @@ jobs: | |
- name: Generate app build name | ||
shell: bash | ||
run: echo "##[set-output name=name;]$(echo sweet_$GITHUB_RUN_NUMBER)" | ||
run: echo "##[set-output name=name;]$(echo sweet_$BUILD_NUMBER)" | ||
id: app_build | ||
|
||
- name: Update Windows build number | ||
shell: bash | ||
run: | | ||
VERSION_FROM_PUBSPEC=$(sed -n -e '/version: / s///p' pubspec.yaml | tr -d '\r\n') | ||
VERSION=$(echo -n $VERSION_FROM_PUBSPEC | sed -E -e "s/((([0-9])+\.([0-9])+\.([0-9])+)\+(([0-9])+))/\2+$GITHUB_RUN_NUMBER/") | ||
VERSION=$(echo -n $VERSION_FROM_PUBSPEC | sed -E -e "s/((([0-9])+\.([0-9])+\.([0-9])+)\+(([0-9])+))/\2+$BUILD_NUMBER/") | ||
echo "Setting windows version to $VERSION" | ||
sed -i -E -e "s/((([0-9])+\.([0-9])+\.([0-9])+(([\+])([0-9])+)?))/$VERSION/" windows/runner/Runner.rc | ||
|
@@ -126,11 +131,11 @@ jobs: | |
- name: Generate app build name | ||
shell: bash | ||
run: echo "##[set-output name=name;]$(echo sweet_$GITHUB_RUN_NUMBER)" | ||
run: echo "##[set-output name=name;]$(echo sweet_$BUILD_NUMBER)" | ||
id: app_build | ||
|
||
# - name: Building ${{ steps.app_build.outputs.name }} iOS | ||
# run: flutter build ios --build-number $GITHUB_RUN_NUMBER --release --no-codesign --config-only | ||
# run: flutter build ios --build-number $BUILD_NUMBER --release --no-codesign --config-only | ||
|
||
# - name: Setup Ruby | ||
# uses: ruby/[email protected] | ||
|
@@ -151,7 +156,7 @@ jobs: | |
# FASTLANE_TEAM_ID: ${{ secrets.FASTLANE_TEAM_ID }} | ||
|
||
- name: Building ${{ steps.app_build.outputs.name }} MacOS | ||
run: flutter build macos --build-number $GITHUB_RUN_NUMBER --release | ||
run: flutter build macos --build-number $BUILD_NUMBER --release | ||
|
||
- name: 'Zipping build' | ||
run: | | ||
|
@@ -198,11 +203,11 @@ jobs: | |
|
||
- name: Generate app build name | ||
shell: bash | ||
run: echo "##[set-output name=name;]$(echo sweet_$GITHUB_RUN_NUMBER)" | ||
run: echo "##[set-output name=name;]$(echo sweet_$BUILD_NUMBER)" | ||
id: app_build | ||
|
||
- name: Building ${{ steps.app_build.outputs.name }}.aab | ||
run: flutter build appbundle --build-number $GITHUB_RUN_NUMBER --release | ||
run: flutter build appbundle --build-number $BUILD_NUMBER --release | ||
|
||
- name: Setup Ruby | ||
uses: ruby/[email protected] | ||
|
@@ -225,7 +230,7 @@ jobs: | |
|
||
- name: Generate app build name | ||
shell: bash | ||
run: echo "##[set-output name=name;]$(echo sweet_$GITHUB_RUN_NUMBER)" | ||
run: echo "##[set-output name=name;]$(echo sweet_$BUILD_NUMBER)" | ||
id: app_build | ||
|
||
- name: 'Download Linux artifact' | ||
|