From 0eb366eb31bcc304002ce0a6af70af04310d38f3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 18:24:45 +0000 Subject: [PATCH] Add-ons: a direct download link on the addons release GitHub Packages offers no download button for the installer, an OCI artifact. The Addons package workflow now also puts the AppImage on the release "addons", whose tag follows main and which is never marked as the latest release: CoreRules-Community-Addons-x86_64.AppImage there is always the newest build, beside a copy named with its version. The READMEs, the guide and the package's description give that link and oras pull. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_016gR4NzQX63exts7wKH4bWD --- .github/workflows/addons.yml | 45 +++++++++++++++++++++++++++++++++--- README.md | 8 ++++--- addons/GUIA.md | 8 ++++--- addons/README.md | 19 +++++++++++---- 4 files changed, 66 insertions(+), 14 deletions(-) diff --git a/.github/workflows/addons.yml b/.github/workflows/addons.yml index 8c1c414..8e48035 100644 --- a/.github/workflows/addons.yml +++ b/.github/workflows/addons.yml @@ -4,7 +4,9 @@ name: Addons package # AppImage with the add-ons inside (crates/cr-addons), and, on main or by # hand, publishes it on GitHub Packages as the OCI artifact # ghcr.io//corerules-community-addons, tagged with the app version -# and latest. +# and latest, and on the release "addons", whose tag follows main: there +# CoreRules-Community-Addons-x86_64.AppImage is always the newest, for a +# download link that does not change. on: push: branches: [main] @@ -24,7 +26,7 @@ on: workflow_dispatch: permissions: - contents: read + contents: write packages: write jobs: @@ -59,6 +61,43 @@ jobs: oras push "ghcr.io/$owner/corerules-community-addons:$version,latest" \ --artifact-type application/vnd.corerules.addons \ --annotation "org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}" \ - --annotation "org.opencontainers.image.description=Core Rules Community Add-ons Collection: 686 community add-ons for AD&D Core Rules 2.0 Expansion, in one self-installing AppImage" \ + --annotation "org.opencontainers.image.description=Core Rules Community Add-ons Collection: 672 community add-ons for AD&D Core Rules 2.0 Expansion, in one self-installing AppImage. Download it from https://github.com/${GITHUB_REPOSITORY}/releases/download/addons/CoreRules-Community-Addons-x86_64.AppImage or with: oras pull ghcr.io/$owner/corerules-community-addons:latest" \ --annotation "org.opencontainers.image.version=$version" \ "CoreRules-Community-Addons-$version-x86_64.AppImage:application/vnd.appimage" + - if: github.event_name != 'pull_request' + name: Move the addons tag to this commit + uses: actions/github-script@v7 + with: + script: | + const ref = { owner: context.repo.owner, repo: context.repo.repo }; + try { + await github.rest.git.updateRef({ ...ref, ref: 'tags/addons', sha: context.sha, force: true }); + } catch (e) { + if (e.status !== 422 && e.status !== 404) throw e; + await github.rest.git.createRef({ ...ref, ref: 'refs/tags/addons', sha: context.sha }); + } + - if: github.event_name != 'pull_request' + run: cp dist/CoreRules-Community-Addons-${{ steps.v.outputs.version }}-x86_64.AppImage dist/CoreRules-Community-Addons-x86_64.AppImage + - if: github.event_name != 'pull_request' + name: Publish on the addons release + uses: softprops/action-gh-release@v2 + with: + tag_name: addons + name: Core Rules Community Add-ons Collection + make_latest: false + body: | + The self-installing AppImage of the [Core Rules Community Add-ons Collection](https://github.com/brahm/corerules/blob/main/addons/README.md), built with Core Rules ${{ steps.v.outputs.version }}. + + Download **CoreRules-Community-Addons-x86_64.AppImage** (always the newest; the file with a version in its name is the same build), then: + + ```sh + chmod +x CoreRules-Community-Addons-x86_64.AppImage + ./CoreRules-Community-Addons-x86_64.AppImage + ``` + + Direct link: https://github.com/${{ github.repository }}/releases/download/addons/CoreRules-Community-Addons-x86_64.AppImage + + The same file is on GitHub Packages: `oras pull ghcr.io/${{ github.repository_owner }}/corerules-community-addons:latest`. The app itself is on the [Core Rules releases](https://github.com/${{ github.repository }}/releases). + files: | + dist/CoreRules-Community-Addons-x86_64.AppImage + dist/CoreRules-Community-Addons-${{ steps.v.outputs.version }}-x86_64.AppImage diff --git a/README.md b/README.md index fc4006a..c4d7eb1 100644 --- a/README.md +++ b/README.md @@ -524,9 +524,11 @@ classes, kits, spells, monsters, modules and the AD&D Core Rules User Database), converted to the Expansion's format and consolidated into 36,525 items, with the 668 pictures that came with them. Monster types, monsters, races and characters show those pictures in the app. It ships as its own self-installing AppImage -(`crates/cr-addons`, GTK 4 and libadwaita), published on GitHub Packages as -[`corerules-community-addons`](https://github.com/brahm/corerules/pkgs/container/corerules-community-addons), -and needs the app 0.7.2 or newer. The installer finds the app on its own, +(`crates/cr-addons`, GTK 4 and libadwaita): +[download it here](https://github.com/brahm/corerules/releases/download/addons/CoreRules-Community-Addons-x86_64.AppImage). +It is also on GitHub Packages as +[`corerules-community-addons`](https://github.com/brahm/corerules/pkgs/container/corerules-community-addons) +(`oras pull ghcr.io/brahm/corerules-community-addons:latest`), and needs the app 0.7.2 or newer. The installer finds the app on its own, whether it came as the Flatpak, the .deb, .rpm or pacman package or an AppImage, and speaks the app's six languages. Its [README](addons/README.md) says what is inside, how it was built and how to install it. diff --git a/addons/GUIA.md b/addons/GUIA.md index a9b4b8e..4612d8c 100644 --- a/addons/GUIA.md +++ b/addons/GUIA.md @@ -16,7 +16,9 @@ O que é preciso: ## Onde baixar -O instalador é publicado no GitHub Packages do projeto, como [`corerules-community-addons`](https://github.com/brahm/corerules/pkgs/container/corerules-community-addons). É um artefato OCI, e não uma imagem de contêiner: o `docker pull` que a página do GitHub mostra não serve. Baixe com o [ORAS](https://oras.land): +**[Baixe o instalador aqui](https://github.com/brahm/corerules/releases/download/addons/CoreRules-Community-Addons-x86_64.AppImage).** O link sempre traz a versão mais nova. A [release addons](https://github.com/brahm/corerules/releases/tag/addons) também guarda cada versão. + +O mesmo arquivo é publicado no GitHub Packages do projeto, como [`corerules-community-addons`](https://github.com/brahm/corerules/pkgs/container/corerules-community-addons). É um artefato OCI, e não uma imagem de contêiner: o `docker pull` que a página do GitHub mostra não serve. Para baixar de lá, use o [ORAS](https://oras.land): ```sh oras pull ghcr.io/brahm/corerules-community-addons:latest @@ -42,8 +44,8 @@ Além de `latest`, cada versão do app tem a sua tag, como `1.0.0-rc1`. 1. Torne o arquivo executável e abra-o: ```sh - chmod +x CoreRules-Community-Addons-*-x86_64.AppImage - ./CoreRules-Community-Addons-*-x86_64.AppImage + chmod +x CoreRules-Community-Addons*x86_64.AppImage + ./CoreRules-Community-Addons*x86_64.AppImage ``` Sem FUSE, rode com `APPIMAGE_EXTRACT_AND_RUN=1`. diff --git a/addons/README.md b/addons/README.md index 7649613..3c5ed2b 100644 --- a/addons/README.md +++ b/addons/README.md @@ -79,15 +79,24 @@ that carries the add-ons inside and installs them itself. It needs: * Your Expansion data in the app; if it is not there yet, open Core Rules and use **Extract Data from CD…** -It is published on GitHub Packages as +**[Download the installer](https://github.com/brahm/corerules/releases/download/addons/CoreRules-Community-Addons-x86_64.AppImage)** +(the link always gives the newest build; the +[addons release](https://github.com/brahm/corerules/releases/tag/addons) +also keeps each version), then: + +```sh +chmod +x CoreRules-Community-Addons-x86_64.AppImage +./CoreRules-Community-Addons-x86_64.AppImage +``` + +The same file is published on GitHub Packages as [`corerules-community-addons`](https://github.com/brahm/corerules/pkgs/container/corerules-community-addons), -an OCI artifact rather than a container image, so `docker pull` does not -apply. Download it with [ORAS](https://oras.land): +an OCI artifact rather than a container image, so the `docker pull` that +page shows does not apply. Download it from there with +[ORAS](https://oras.land): ```sh oras pull ghcr.io/brahm/corerules-community-addons:latest -chmod +x CoreRules-Community-Addons-*-x86_64.AppImage -./CoreRules-Community-Addons-*-x86_64.AppImage ``` The [Portuguese guide](GUIA.md) also shows how to download it with