Merge pull request #654 from mavericm1/add-appimages-to-releases
update release with appimages when a tag matches
This commit is contained in:
2 files changed
+65
No files matched your search
@@ -4,6 +4,12 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
tags:
|
||||||
|
- 'BETA-*'
|
||||||
|
- 'PRE-BETA-*'
|
||||||
|
- 'Alpha*'
|
||||||
|
- 'RELEASE-*'
|
||||||
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -198,3 +204,51 @@ jobs:
|
|||||||
cache: true
|
cache: true
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: flutter build web --release --no-pub
|
- run: flutter build web --release --no-pub
|
||||||
|
|
||||||
|
publish-linux-assets:
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
needs:
|
||||||
|
- linux
|
||||||
|
- linux-arm64
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux-x86_64-appimage
|
||||||
|
path: release/linux-x86_64
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux-arm64-appimage
|
||||||
|
path: release/linux-arm64
|
||||||
|
- name: Prepare Linux AppImages
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
version="$(sed -n 's/^version: *//p' pubspec.yaml)"
|
||||||
|
test -n "$version"
|
||||||
|
x86_64="$(find release/linux-x86_64 -type f -name 'meshcore-open-x86_64.AppImage' -print -quit)"
|
||||||
|
aarch64="$(find release/linux-arm64 -type f -name 'meshcore-open-aarch64.AppImage' -print -quit)"
|
||||||
|
test -n "$x86_64"
|
||||||
|
test -n "$aarch64"
|
||||||
|
mkdir -p dist
|
||||||
|
cp "$x86_64" "dist/meshcore-open-${version}-linux-x86_64.AppImage"
|
||||||
|
cp "$aarch64" "dist/meshcore-open-${version}-linux-aarch64.AppImage"
|
||||||
|
chmod +x dist/*.AppImage
|
||||||
|
- name: Publish Linux AppImages
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
TAG: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
files=(dist/*.AppImage)
|
||||||
|
if gh release view "$TAG" >/dev/null 2>&1; then
|
||||||
|
gh release upload "$TAG" "${files[@]}" --clobber
|
||||||
|
else
|
||||||
|
gh release create "$TAG" "${files[@]}" \
|
||||||
|
--verify-tag \
|
||||||
|
--title "$TAG" \
|
||||||
|
--generate-notes
|
||||||
|
fi
|
||||||
@@ -307,6 +307,17 @@ flutter build apk --release
|
|||||||
flutter build ios --release
|
flutter build ios --release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**GitHub Releases:**
|
||||||
|
|
||||||
|
Pushing a release tag (`BETA-*`, `PRE-BETA-*`, `Alpha*`, `RELEASE-*`, or
|
||||||
|
`v*`) runs CI and attaches both Linux AppImages to that tag's GitHub Release:
|
||||||
|
|
||||||
|
- `meshcore-open-<version>-linux-x86_64.AppImage`
|
||||||
|
- `meshcore-open-<version>-linux-aarch64.AppImage`
|
||||||
|
|
||||||
|
If the tag has no release yet, CI creates one with generated notes. Re-running
|
||||||
|
the workflow replaces the existing Linux assets.
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in new issue
Block a user