Files
cloud-sync/.gitea/workflows/ci.yaml
T
claude-timemachine ed4115cba8
CI / build (push) Failing after 3s
CI / release (push) Has been skipped
rename: cloud-installer → cloud-sync
'installer' implied one-way install (matching packwiz-installer); this
tool is bidirectional sync (pull on launch, push on exit). Aligns with
the existing automc <scope>-<role> pattern: cloud-svc ↔ cloud-sync,
matching mc-router, mc-wrapper, gate-waker.

Gitea repo renamed via API (id 2974 preserved); jar filename now
cloud-sync-<version>.jar. Build verified post-rename.
2026-06-02 20:25:27 +02:00

60 lines
1.7 KiB
YAML

name: CI
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
container:
image: docker.io/gradle:8.10.2-jdk21
steps:
- uses: actions/checkout@v4
- name: Build fat jar
run: gradle --no-daemon shadowJar
- name: Test
run: gradle --no-daemon test
- name: Stash jar for release
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
with:
name: cloud-sync-jar
path: build/libs/cloud-sync-*.jar
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cloud-sync-jar
path: build/libs/
- name: Publish release
run: |
gh_token="${{ secrets.RELEASE_TOKEN }}"
tag="${GITEA_REF#refs/tags/}"
curl -sS -X POST \
-H "Authorization: token ${gh_token}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${tag}\",\"name\":\"${tag}\",\"draft\":false,\"prerelease\":false}" \
"${GITEA_SERVER_URL}/api/v1/repos/${{ gitea.event.repository.full_name }}/releases" > /tmp/release.json
release_id=$(jq -r .id /tmp/release.json)
for jar in build/libs/cloud-sync-*.jar; do
curl -sS -X POST \
-H "Authorization: token ${gh_token}" \
-F "attachment=@${jar}" \
"${GITEA_SERVER_URL}/api/v1/repos/${{ gitea.event.repository.full_name }}/releases/${release_id}/assets?name=$(basename $jar)"
done