| 85 | 85 | | # builds as before. |
| 86 | 86 | | - name: sccache |
| 87 | 87 | | run: bash scripts/sccache.sh install |
| 88 | + | # The cache above brings back the last release's target/runner-release |
| 89 | + | # too: left there, it would go out with this one's, and the jobs after |
| 90 | + | # would find two of each file. |
| 91 | + | - name: Only this release's files |
| 92 | + | run: rm -rf target/runner-release |
| 88 | 93 | | - name: Build Linux and Windows |
| 89 | 94 | | # The macOS targets need Apple's SDK to link (the Security and |
| 90 | 95 | | # CoreFoundation frameworks), which zig does not carry, so they are |
| ⋯ |
| 152 | 157 | | mkdir -p "context-$arch" |
| 153 | 158 | | cp deploy/runner/Dockerfile "context-$arch/" |
| 154 | 159 | | name="g1t-runner-linux-$([ "$arch" = amd64 ] && echo x64 || echo arm64)" |
| 155 | | − | cp release/*/"$name" "context-$arch/g1t-runner" |
| 160 | + | cp "release/$version/$name" "context-$arch/g1t-runner" |
| 156 | 161 | | docker buildx build --platform "linux/$arch" -t "$IMAGE:$version-$arch" --load "context-$arch" |
| 157 | 162 | | docker push "$IMAGE:$version-$arch" |
| 158 | 163 | | tags+=("$IMAGE:$version-$arch") |
| ⋯ |
| 187 | 192 | | env: |
| 188 | 193 | | ARCHES: ${{ steps.qemu.outputs.arches }} |
| 189 | 194 | | run: | |
| 190 | | − | dir="$(echo target/runner-release/*/)" |
| 195 | + | version="$(sed -n 's/^version = "\(.*\)"/\1/p' crates/runner/Cargo.toml | head -1)" |
| 196 | + | dir="target/runner-release/$version/" |
| 191 | 197 | | for arch in $ARCHES; do |
| 192 | 198 | | node scripts/sandbox-image.mjs build --arch "$arch" --runner "${dir}g1t-runner-linux-$arch" --out "$dir" |
| 193 | 199 | | done |
| 194 | 200 | | - name: The manifest's sandbox section |
| 195 | 201 | | env: |
| 196 | 202 | | RUNNER_SANDBOX_IMAGE: ${{ needs.image.outputs.runner_image }} |
| 197 | | − | run: node scripts/sandbox-image.mjs section --dir "$(echo target/runner-release/*/)" |
| 203 | + | run: | |
| 204 | + | version="$(sed -n 's/^version = "\(.*\)"/\1/p' crates/runner/Cargo.toml | head -1)" |
| 205 | + | node scripts/sandbox-image.mjs section --dir "target/runner-release/$version/" |
| 198 | 206 | | - uses: actions/upload-artifact@v4 |
| 199 | 207 | | with: |
| 200 | 208 | | name: sandbox |