Skip to content

Commit

Permalink
ci: fix uploading release artifacts to GitHub release
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Jun 28, 2024
1 parent 0a512da commit a635f6b
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/publish-quickgui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
exit 1
fi
build-linux-x64:
publish-linux-x64:
needs: [version-check]
name: "Build Linux x64 🏗️"
name: "Publish Linux (x64) 🐙"
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
Expand Down Expand Up @@ -78,26 +78,19 @@ jobs:
run: flutter_distributor package --platform=linux --targets=zip
- name: Show artifacts 👀
run: tree dist/

publish-release:
needs: [build-linux-x64]
name: "Publish Release 📤️"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Publish release ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
gh release create "${{ github.ref }}" --draft --generate-notes
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
- name: "Publish Release 📤️"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
gh release create "${{ github.ref }}" --draft --generate-notes
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:
needs: [version-check]
Expand All @@ -120,6 +113,7 @@ jobs:

publish-ppa-x64:
needs: [version-check]
name: "Publish PPA (x64) 🟠"
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
Expand Down

0 comments on commit a635f6b

Please sign in to comment.