1 parent
9993f2aeea
commit
0535521e8e
2 files changed
+6
-48
No files matched your search
@@ -1,29 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
# The runner may be arm64; Arch Linux only ships x86_64 images, so run them emulated.
|
||||
container:
|
||||
image: archlinux:latest
|
||||
options: --platform linux/amd64
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pacman -Syu --noconfirm --needed git nodejs base-devel cmake ninja extra-cmake-modules \
|
||||
qt6-base qt6-declarative kirigami ki18n kcoreaddons kcrash kconfig \
|
||||
mpvqt qcoro qtkeychain-qt6 ffmpeg
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Test
|
||||
env:
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
@@ -1,8 +1,8 @@
|
||||
name: Release
|
||||
name: Probe
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
branches: ['probe/**']
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -27,25 +27,12 @@ jobs:
|
||||
- name: Source tarball
|
||||
run: |
|
||||
git config --global --add safe.directory "$PWD"
|
||||
version="${GITHUB_REF_NAME#v}"
|
||||
version=0.0.0
|
||||
mkdir -p dist
|
||||
git archive --format=tar --prefix="qtpotato-$version/" "$GITHUB_REF_NAME" \
|
||||
git archive --format=tar --prefix="qtpotato-$version/" HEAD \
|
||||
| gzip -n > "dist/qtpotato-$version.tar.gz"
|
||||
- name: AppImage
|
||||
run: |
|
||||
LDAI_OUTPUT="$PWD/dist/QtPotato-${GITHUB_REF_NAME#v}-x86_64.AppImage" \
|
||||
LDAI_OUTPUT="$PWD/dist/QtPotato-0.0.0-x86_64.AppImage" \
|
||||
packaging/appimage/build-appimage.sh "$PWD/build-appimage"
|
||||
- name: Publish release
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
cd dist
|
||||
sha256sum -- * > SHA256SUMS
|
||||
api="$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY"
|
||||
id=$(jq -n --arg tag "$GITHUB_REF_NAME" '{tag_name: $tag, name: ("QtPotato " + ($tag | ltrimstr("v")))}' \
|
||||
| curl -fsS -X POST -H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \
|
||||
--data @- "$api/releases" | jq -r .id)
|
||||
for f in *; do
|
||||
curl -fsS -X POST -H "Authorization: token $TOKEN" \
|
||||
-F "attachment=@$f" "$api/releases/$id/assets?name=$f" > /dev/null
|
||||
done
|
||||
- run: ls -la dist && file dist/*.AppImage && sha256sum dist/*
|
||||
Reference in new issue
Block a user