ci: target this instance's nix runner
ci / Nix flake checks (push) Failing after 1h6m15s

- run on the 'nix' label with Nix preinstalled; drop the installer action
- replace the inline release API calls with vpm/publish.sh
- add curl to the devShell for the publish step
This commit is contained in:
2026-09-19 16:09:21 +01:00
parent e5f8a078e1
commit e82f2b7de7
4 changed files with 53 additions and 53 deletions
+11 -33
View File
@@ -7,21 +7,14 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
name: Publish VPM release
runs-on: nix
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
experimental-features = nix-command flakes
# package.sh globs $root/result/lib/*, so the aac package must be linked as ./result.
- name: Build native library
- name: Build Rust core
run: nix build .#aac --print-build-logs
- name: Package VPM zip
@@ -33,35 +26,20 @@ jobs:
SERVER: ${{ github.server_url }}
REPO: ${{ github.repository }}
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
manifest=csharp/dev.doloro.animator-as-crab/package.json
id=$(jq -r .name "$manifest")
version=$(jq -r .version "$manifest")
zip="vpm/dist/$id-$version.zip"
run: nix develop -c ./vpm/publish.sh
release=$(curl -fsS -X POST \
-H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
"$SERVER/api/v1/repos/$REPO/releases" \
-d "$(jq -n --arg tag "$TAG" --arg name "$id $version" \
'{tag_name: $tag, name: $name, draft: false}')")
curl -fsS -X POST \
-H "Authorization: token $TOKEN" \
"$SERVER/api/v1/repos/$REPO/releases/$(jq -r .id <<<"$release")/assets?name=$(basename "$zip")" \
-F "attachment=@$zip"
# The index ships the zip's sha256, which only exists after packaging, so it is committed here.
# The index carries the zip's sha256, which only exists after packaging.
- name: Commit updated VPM index
env:
TOKEN: ${{ secrets.VPM_TOKEN || secrets.GITHUB_TOKEN }}
SERVER: ${{ github.server_url }}
REPO: ${{ github.repository }}
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
git config user.name gitea-actions
git config user.name gitea-actions
git config user.email actions@git.scug.io
git add vpm/index.json
git diff --cached --quiet && exit 0
version=$(jq -r .version csharp/dev.doloro.animator-as-crab/package.json)
git commit -m "vpm: index for $version"
git push "https://x-access-token:$TOKEN@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" \
HEAD:main
git commit -m "vpm: index for $TAG"
git push "https://x-access-token:$TOKEN@${SERVER#https://}/${REPO}.git" HEAD:main