diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index d101047..60d3c3d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -41,12 +41,31 @@ jobs: # so the auto-generated Source Code (zip/tar.gz) links stay hidden. curl -sf -X PATCH -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" \ "$API/repos/$REPO/releases/$RID" -d '{"hide_archive_links":true}' >/dev/null || true - # Upload every dist/*.zip + # Upload every dist/*.zip. Re-running for an existing tag 409s on + # duplicate asset names - warn and keep going instead of letting + # set -e kill the job; only fail if the release ends up with zero + # assets. + existing=$(curl -s -H "Authorization: token $GITEA_TOKEN" \ + "$API/repos/$REPO/releases/$RID/assets" | jq -r '.[].name' || true) + uploaded=0 + present=0 for f in dist/*.zip; do name=$(basename "$f") + if printf '%s\n' "$existing" | grep -qxF "$name"; then + echo "::warning::$name already attached (re-run for existing tag) - skipping" + present=$((present+1)) + continue + fi echo "uploading $name" - curl -sf -X POST -H "Authorization: token $GITEA_TOKEN" \ - -F "attachment=@$f" \ - "$API/repos/$REPO/releases/$RID/assets?name=$name" \ - | jq -r '" -> " + .browser_download_url' + if curl -sf -X POST -H "Authorization: token $GITEA_TOKEN" \ + -F "attachment=@$f" \ + "$API/repos/$REPO/releases/$RID/assets?name=$name" \ + | jq -r '" -> " + .browser_download_url'; then + uploaded=$((uploaded+1)) + else + echo "::warning::upload failed for $name (duplicate asset on re-run?)" + fi done + echo "release published: $uploaded uploaded, $present already present" + # Only fail the job if NO assets ended up on the release. + [ "$((uploaded + present))" -gt 0 ] diff --git a/README.md b/README.md index 682456f..50407bb 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The `.gitea/workflows/release.yml` workflow picks up any tag starting with `ExilesPack-.zip` to a Gitea release. The pack lands at -[git.sub-net.at/Exiles/coa-pack/releases](https://git.sub-net.at/Exiles/coa-pack/releases). +[git.exil.es/coa/AddonPack/releases](https://git.exil.es/coa/AddonPack/releases). ## Build locally diff --git a/manifest.yaml b/manifest.yaml index cfd745d..681e1d9 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -1,52 +1,52 @@ pack: name: ExilesPack default_branch: master - source: https://git.sub-net.at/Exiles + source: https://git.exil.es/coa-addons # Repos to include in the pack. `include: false` means the repo is in the org but # either contains libraries only (coa-ace3) or isn't an end-user addon. addons: - - repo: coa-ace3 # canonical Ace3 bundle - libs, not deployed as addon + - repo: Ace3 # canonical Ace3 bundle - libs, not deployed as addon include: false note: "Ace3 libs are already embedded inside each consuming fork; the pack doesn't need them again." - - repo: coa-template # template-only — not an installable addon + - repo: Template # template-only — not an installable addon include: false - note: "Gitea "Use This Template" source repo for new coa-* forks." + note: 'Gitea "Use This Template" source repo for new coa-* forks.' - repo: coa-ai-voiceover include: false note: "1.2 GiB of MP3 voice data + small lua framework; far too big to bundle. Track the addon separately (see /coa/dev/addons)." - - repo: coa-altoholic + - repo: Altoholic include: true # If a repo has a *-all.zip release asset, prefer it over individual zips. Otherwise take all per-addon zips. - - repo: coa-atlasloot + - repo: AtlasLoot include: true - - repo: coa-bagnon + - repo: Bagnon include: true - - repo: coa-bartender + - repo: Bartender4 include: true - - repo: coa-chatter + - repo: Chatter include: true - - repo: coa-clique + - repo: Clique include: true - - repo: coa-dbm + - repo: DBM include: true - - repo: coa-decursive + - repo: Decursive include: true - - repo: coa-details + - repo: Details include: true - - repo: coa-elvui + - repo: ElvUI include: true note: "Repo-only - not part of the default Exiles install. Set include:false if you want a slimmer pack." @@ -54,42 +54,42 @@ addons: include: false note: "Internal data-export tool (CoaExporter) — not shipped to guildies, not released." - - repo: coa-kui-nameplates + - repo: Kui_Nameplates include: true - - repo: coa-leatrix-plus + - repo: Leatrix_Plus include: true - - repo: coa-moveanything + - repo: MoveAnything include: true - - repo: coa-omen + - repo: Omen include: true - - repo: coa-pawn + - repo: Pawn include: true - - repo: coa-professionmenu + - repo: ProfessionMenu include: true - - repo: coa-quartz + - repo: Quartz include: true - - repo: coa-ratingbuster + - repo: RatingBuster include: true - - repo: coa-sexymap + - repo: SexyMap include: true - - repo: coa-shadowedunitframes + - repo: ShadowedUnitFrames include: true - - repo: coa-tsm + - repo: TradeSkillMaster include: true - - repo: coa-vanillaguide - include: false - note: "Excluded until ported off Ace2 — AceOO-2.0 table.setn/getn crash at load on 3.3.5. Re-include once it runs." - - - repo: coa-weakauras + - repo: VanillaGuide + include: true + note: "Ace2 stack runs on 3.3.5 via Lua50Compat shim (table.getn/setn restored) since 1.04.2-coa1-coa.2." + + - repo: WeakAuras include: true diff --git a/tools/build_pack.sh b/tools/build_pack.sh index f4477ac..071fcc7 100755 --- a/tools/build_pack.sh +++ b/tools/build_pack.sh @@ -23,8 +23,8 @@ TMP_DIR="$REPO_ROOT/tmp" STAGING_DIR="$REPO_ROOT/staging" DIST_DIR="$REPO_ROOT/dist" -API="https://git.sub-net.at/api/v1" -ORG="Exiles" +API="https://git.exil.es/api/v1" +ORG="coa-addons" TAG="" while [ $# -gt 0 ]; do @@ -78,13 +78,14 @@ manifest_includes() { ' "$MANIFEST" } -# Latest release JSON for a repo, or empty string if none. +# Latest stable release JSON for a repo, or empty string if none. latest_release_json() { local repo="$1" json - json="$(curl -fsS "$API/repos/$ORG/$repo/releases?limit=1" 2>/dev/null || echo '[]')" - # `releases?limit=1` returns an array. Strip the wrapper. + json="$(curl -fsS "$API/repos/$ORG/$repo/releases?limit=10" 2>/dev/null || echo '[]')" + # `releases?limit=N` returns a newest-first array that can contain + # prereleases/drafts - pick the first stable release. if [ "$(printf '%s' "$json" | jq -r 'type')" = "array" ]; then - printf '%s' "$json" | jq -c '.[0] // empty' + printf '%s' "$json" | jq -c '[.[] | select(.prerelease == false and .draft == false)][0] // empty' else printf '' fi