ci: add Gitea Actions CI, tag releases and AUR PKGBUILDs
This commit is contained in:
1 parent
bcfc2f3f6a
commit
cda6352b07
7 files changed
+228
No files matched your search
@@ -0,0 +1,48 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
container: archlinux:latest
|
||||
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
|
||||
Reference in new issue
Block a user