I am having 2 jobs in the Github runner. The first job builds the android apk. The second one to build a zip file. I want to have both the apk and the zip file in the same release. But after the apk is published into a release, the zip file does not get published into the release. The error shown is:
Validation Failed {"resource":"Release","code":"already_exists","field":"tag_name"}
buid.yml
:
name: Build Process
on:
push:
tags:
- v*
jobs:
Build_Android:
if: "!contains(github.event.head_commit.message, 'skip-android')"
name: Build APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "12.x"
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Get Packages
run: flutter pub get
- name: Build APK
run: flutter build apk --split-per-abi --release
- name: Create Github Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/*.apk"
replacesArtifacts: false
token: ${{ secrets.TOKEN }}
Build_Windows:
if: "!contains(github.event.head_commit.message, 'skip-windows')"
name: Building zip
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "12.x"
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Get Packages
run: flutter pub get
- name: Enable windows build
run: flutter config --enable-windows-desktop
- name: Build Artifacts
run: flutter build windows --release
- name: Archive Artifacts
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: AppName-${{github.ref_name}}-windows.zip
directory: build/windows/runner/Release
- name: Create Github Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/windows/runner/Release/AppName-${{github.ref_name}}-windows.zip"
replacesArtifacts: false
token: ${{ secrets.TOKEN }}
Any help is greatly appreciated!
Thank!