From 207cc73fbf7f99edcdc8b30ce4028e0734702caa Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Fri, 21 Jul 2023 11:10:13 -0700 Subject: [PATCH] Add release action --- .gitea/workflows/release.yaml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/release.yaml diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..17e2929 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,39 @@ +name: Release +run-name: Build the project for release +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Install system dependencies + run: apt update && apt install -y flatpak-builder flatpak python3-aiohttp python3-tenacity libostree-1-1 python3-gi gir1.2-ostree-1.0 wget + - name: Add flathub repo and install flatpak dependencies + run: flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + - name: Build project + run: flatpak-builder --install-deps-from flathub build-flatpak com.experimentalcraft.NekoPlayer.yml --repo ./flatpak-repo + - name: Download uploading script + run: wget https://raw.githubusercontent.com/flatpak/flat-manager/9401efbdc0d6bd489507d8401c567ba219d735d5/flat-manager-client -O flat-manager-client && chmod +x flat-manager-client + - name: Upload to flatpak repo + run: ./flat-manager-client -v --token $FLATPAK_TOKEN push --commit --publish $(./flat-manager-client -v --token $FLATPAK_TOKEN create http://192.168.122.249:8080 stable) ./flatpak-repo/ + env: + FLATPAK_TOKEN: ${{ secrets.FLATPAK_TOKEN }} + - name: Release + id: release + uses: https://gitea.com/actions/release-action@main + with: + files: |- + flatpakref/stable.flatpakref + api_key: '${{secrets.RELEASE_TOKEN}}' + #- uses: actions/upload-artifact@v3 + # with: + # name: build + # path: builddir/player