ci: fix uploading release artifacts to GitHub release

This commit is contained in:
Martin Wimpress 2024-06-28 17:28:43 +01:00
parent 0a512da081
commit a635f6b8c3
No known key found for this signature in database
1 changed files with 16 additions and 22 deletions

View File

@ -40,9 +40,9 @@ jobs:
exit 1 exit 1
fi fi
build-linux-x64: publish-linux-x64:
needs: [version-check] needs: [version-check]
name: "Build Linux x64 🏗️" name: "Publish Linux (x64) 🐙"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: "Checkout 🥡" - name: "Checkout 🥡"
@ -78,26 +78,19 @@ jobs:
run: flutter_distributor package --platform=linux --targets=zip run: flutter_distributor package --platform=linux --targets=zip
- name: Show artifacts 👀 - name: Show artifacts 👀
run: tree dist/ run: tree dist/
- name: "Publish Release 📤️"
publish-release: env:
needs: [build-linux-x64] GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: "Publish Release 📤️" run: |
runs-on: ubuntu-22.04 REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
steps: gh release create "${{ github.ref }}" --draft --generate-notes
- uses: actions/checkout@v4 for PKG in AppImage deb rpm zip; do
- name: Publish release ${{ github.ref }} gh release upload "${{ github.ref }}" "dist/${REL_VER}/quickgui-${REL_VER}-linux.${PKG}" --clobber
env: done
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -lt 0 ]; then
run: | exit 1
REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2) fi
gh release create "${{ github.ref }}" --draft --generate-notes gh release edit "${{ github.ref }}" --draft=false
for PKG in AppImage deb rpm zip; do
gh release upload "${{ github.ref }}" "dist/${REL_VER}/quickgui-${REL_VER}-linux.${PKG}" --clobber
done
if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -lt 0 ]; then
exit 1
fi
gh release edit "${{ github.ref }}" --draft=false
publish-flakehub: publish-flakehub:
needs: [version-check] needs: [version-check]
@ -120,6 +113,7 @@ jobs:
publish-ppa-x64: publish-ppa-x64:
needs: [version-check] needs: [version-check]
name: "Publish PPA (x64) 🟠"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: "Checkout 🥡" - name: "Checkout 🥡"