name: Release # Triggered by the version-x.y.z tag that `make jjrelease` pushes. This kit is not a crate: no # publication to the registry. Creates the Forgejo release (tag notes) and attaches the archive of overlay/ to it. # The scripts come from crate-kit, cloned alongside. Safe to replay. # # Repository secret: FORGETOKEN (Forgejo token with write rights on the repositories and the releases). on: push: tags: - "version-*" jobs: release: runs-on: ubuntu-latest timeout-minutes: 10 env: FORGETOKEN: ${{ secrets.FORGETOKEN }} TAG: ${{ github.ref_name }} SERVER: ${{ github.server_url }} REPO: ${{ github.repository }} # crate-kit has ONE reference: gargoton (public repository, anonymous clone). It is not mirrored on # this forge. Override only with the repository variable CRATE_KIT_URL (Settings > Actions > Variables). # FORGETOKEN belongs to this forge and is never sent to another host. CRATE_KIT_URL: ${{ vars.CRATE_KIT_URL || 'https://gargoton.petite-maison-orange.fr/LLM/crate-kit' }} steps: - name: System tools run: | apt-get update -qq apt-get install -y -qq git curl jq make - name: Sources of the version and of crate-kit run: | git -c http.extraHeader="Authorization: token $FORGETOKEN" \ clone --depth 1 --branch "$TAG" "$SERVER/$REPO.git" src git clone --depth 1 "$CRATE_KIT_URL" crate-kit - name: Kit archive working-directory: src run: make dist CRATE_KIT="$GITHUB_WORKSPACE/crate-kit" - name: Create the Forgejo release working-directory: src run: | ASSET=$(ls dist/obi-kit-*.tar.gz) "$GITHUB_WORKSPACE/crate-kit/kit/scripts/forgejo-release.sh"