Registry obi on forge.metabarcoding.org, KIT_LANG=en, CeCILL-2.1. Skeleton generated by crate-kit adopt-kit.sh, plus docs/pilot-risks.md (Gitea risks to test on a throwaway crate before any publication).
46 lines
1.7 KiB
YAML
46 lines
1.7 KiB
YAML
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 }}
|
|
# Where crate-kit lives on the forge (owner/name), independent of the owner of this repository.
|
|
# Override with the repository variable CRATE_KIT_REPO (Settings > Actions > Variables).
|
|
CRATE_KIT_REPO: ${{ vars.CRATE_KIT_REPO || '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 -c http.extraHeader="Authorization: token $FORGETOKEN" \
|
|
clone --depth 1 "$SERVER/$CRATE_KIT_REPO.git" 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"
|