Files
Notify/.gitea/ci.yml
Colin Powell 9818c71f35
Some checks failed
CI / Rustfmt (push) Successful in 29s
CI / Flatpak (push) Failing after 5s
[ci] Make proper gitea ci and revert github
2026-03-19 22:53:46 -04:00

61 lines
2.0 KiB
YAML

on:
push:
branches: [main]
pull_request:
name: CI
jobs:
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Create blank versions of configured file
run: echo -e "" >> src/config.rs
- name: Run cargo fmt
run: cargo fmt --all -- --check
flatpak:
runs-on: ubuntu-latest
steps:
- name: Checkout source
run: |
git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
git checkout ${{ gitea.sha }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder xserver-xorg-video-dummy xvfb
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- name: Install SDK
run: |
flatpak install -y flathub org.freedesktop.Sdk/x86_64/48 org.freedesktop.Sdk.Extension.rust-stable/x86_64/48 org.freedesktop.Sdk.Extension.llvm18/x86_64/18 org.gnome.Platform/x86_64/48
- name: Build Flatpak
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \
flatpak-builder \
--repo=repo \
--force-clean \
--install-deps-from=flathub \
--default-branch=master \
--arch=x86_64 \
build-dir \
build-aux/com.ranfdev.Notify.Devel.json
- name: Bundle Flatpak
run: flatpak build-bundle repo notify.flatpak com.ranfdev.Notify.Devel
- name: Upload artifact
run: |
curl -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-F "file=@notify.flatpak" \
${GITEA_SERVER_URL}/api/packages/${GITEA_REPOSITORY_OWNER}/generic/notify/latest/notify.flatpak