name: release on: push: tags: ['v*'] workflow_dispatch: jobs: release: name: Publish VPM release runs-on: nix steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Build Rust core run: nix build .#aac --print-build-logs - name: Package VPM zip run: nix develop -c bash ./vpm/package.sh - name: Publish release and upload zip env: TOKEN: ${{ secrets.VPM_TOKEN || secrets.GITHUB_TOKEN }} SERVER: ${{ github.server_url }} REPO: ${{ github.repository }} TAG: ${{ github.ref_name }} run: nix develop -c bash ./vpm/publish.sh # 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.email actions@git.scug.io git add vpm/index.json git diff --cached --quiet && exit 0 git commit -m "vpm: index for $TAG" git push "https://x-access-token:$TOKEN@${SERVER#https://}/${REPO}.git" HEAD:main