diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index bfe465b..daaafd6 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -16,7 +16,10 @@ on: branches: [master] push: branches: [master] - tags: ['[0-9]+.[0-9]+.[0-9]+'] + # Bare semver tags. Spelled with globs so it means the same whether the + # forge reads it as a workflow pattern or as a plain glob; `latest`, the + # rolling tag this workflow moves itself, does not start with a digit. + tags: ['[0-9]*.[0-9]*.[0-9]*'] workflow_dispatch: env: @@ -43,7 +46,7 @@ jobs: pacman-key --init pacman-key --populate archlinux pacman -Sy --noconfirm --needed archlinux-keyring - pacman -Syu --noconfirm --needed flatpak flatpak-builder ccache git nodejs jq gnupg go-yq ostree + pacman -Syu --noconfirm --needed flatpak flatpak-builder ccache git nodejs jq gnupg go-yq ostree python git config --global --add safe.directory '*' - name: Sdk @@ -74,7 +77,15 @@ jobs: exit 1 fi else - version="0.0.0-dev+$(git rev-parse --short HEAD)" + # A master build names itself after the release it follows, the + # way a local checkout does: 2.0.0-3-g21746b1 is three commits + # past 2.0.0. Before the first tag there is nothing to describe + # from and the bare hash gets a placeholder in front. + described=$(git describe --tags --always --exclude=latest) + case "$described" in + [0-9]*.[0-9]*.[0-9]*) version="$described" ;; + *) version="0.0.0-dev+$described" ;; + esac branch=beta fi echo "version=$version" >> "$GITHUB_OUTPUT" @@ -189,6 +200,6 @@ jobs: repo: ${{ github.repository }} tag: ${{ github.ref_name }} title: crafter-build ${{ github.ref_name }} - release-notes: release-notes.md + release-notes-file: release-notes.md release-dir: dist token: ${{ secrets.GITHUB_TOKEN }} diff --git a/packaging/flatpak/net.catcrafts.CrafterBuild.metainfo.xml b/packaging/flatpak/net.catcrafts.CrafterBuild.metainfo.xml index 7108966..afe8428 100644 --- a/packaging/flatpak/net.catcrafts.CrafterBuild.metainfo.xml +++ b/packaging/flatpak/net.catcrafts.CrafterBuild.metainfo.xml @@ -25,7 +25,7 @@ - +

First release distributed as a Flatpak, with a bundled LLVM 22 toolchain and WASI sysroot. Windows host support is removed; crafter-build gains --version and resolves its compiler from one place.