chore: update release version

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-04 11:59:40 +08:00
parent 9cf74c0db6
commit 7ac4a32468
3 changed files with 15 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ github.event.inputs.branch }} ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup flutter - name: Setup flutter
uses: subosito/flutter-action@v2 uses: subosito/flutter-action@v2
@@ -26,6 +27,11 @@ jobs:
- name: Set up xcode - name: Set up xcode
uses: BoundfoxStudios/action-xcode-select@v1 uses: BoundfoxStudios/action-xcode-select@v1
- name: 更新版本号
run: |
version_name=$(yq e '.version' pubspec.yaml | cut -d "+" -f 1)
sed -i '' "s/version: .*/version: $version_name+$(git rev-list --count HEAD)/" pubspec.yaml
- name: Build iOS - name: Build iOS
run: | run: |
chmod +x lib/scripts/build.sh chmod +x lib/scripts/build.sh

View File

@@ -10,6 +10,8 @@ jobs:
steps: steps:
- name: 代码迁出 - name: 代码迁出
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 构建Java环境 - name: 构建Java环境
uses: actions/setup-java@v4 uses: actions/setup-java@v4
@@ -34,6 +36,11 @@ jobs:
- name: 下载项目依赖 - name: 下载项目依赖
run: flutter pub get run: flutter pub get
- name: 更新版本号
run: |
version_name=$(yq e .version pubspec.yaml | cut -d "+" -f 1)
sed -i "s/version: .*/version: $version_name-$(git rev-parse --short HEAD)+$(git rev-list --count HEAD)/g" pubspec.yaml
- name: Write key - name: Write key
run: | run: |
if [ ! -z "${{ secrets.SIGN_KEYSTORE_BASE64 }}" ]; then if [ ! -z "${{ secrets.SIGN_KEYSTORE_BASE64 }}" ]; then

View File

@@ -16,7 +16,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.22+123 # update when release
version: 1.1.0+1
environment: environment:
sdk: ">=3.0.0 <4.0.0" sdk: ">=3.0.0 <4.0.0"