我想从 Firebase App distribution 的 GitHub action 脚本设置版本号。地点在这里:
我已经尝试使用下面的 Github action 脚本,但似乎 firebase appdistribution:distribute 插件没有 appRelease
选项 # Extract Version from Git Tag
- name: Extract Version from Tag
id: extract_version
run: echo "::set-output name=version::$(echo ${{ github.ref }} | sed -n 's/refs\/tags\/v//p')"
# Extract Release Notes from Tag Message
- name: Extract Release Notes from Tag
id: get_tag_message
run: |
tag_message=$(git log -1 --pretty=%B)
echo "::set-output name=tag-message::$tag_message"
# Upload APK to Firebase App Distribution
- name: Upload APK to Firebase App Distribution
run: |
firebase appdistribution:distribute build/app/outputs/flutter-apk/app-release.apk \
--app "${{ secrets.APPID }}" \
--groups "testers" \
--debug \
--release-notes "Version: ${{ steps.extract_version.outputs.version }} | Release Notes: ${{ steps.get_tag_message.outputs.tag-message }}"
有人可以帮忙设置一下版本号吗?
我认为 Firebase 从
android:versionName
文件(包含在 .apk 中)中的 AndroidManifest.xml
字段获取版本。您检查过该字段的值吗?
至于括号中的数字,即用于确定构建是升级还是降级的 android:versionCode
字段,如here所述。