name: Release on: push: tags: ['v*'] permissions: contents: write jobs: release: 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 qt6-svg qt6-wayland kirigami ki18n kcoreaddons kcrash kconfig \ mpvqt qcoro qtkeychain-qt6 ffmpeg plasma-integration qqc2-desktop-style breeze union \ curl jq file - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Source tarball run: | git config --global --add safe.directory "$PWD" version="${GITHUB_REF_NAME#v}" mkdir -p dist git archive --format=tar --prefix="qtpotato-$version/" "$GITHUB_REF_NAME" \ | gzip -n > "dist/qtpotato-$version.tar.gz" - name: AppImage run: | LDAI_OUTPUT="$PWD/dist/QtPotato-${GITHUB_REF_NAME#v}-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