|
9 | 9 | description: Rust nightly date |
10 | 10 | required: true |
11 | 11 |
|
| 12 | +env: |
| 13 | + EMCC_VERSION: ${{ inputs.emcc_version }} |
| 14 | + RUST_NIGHTLY_DATE: ${{ inputs.rust_nightly_date }} |
| 15 | + |
| 16 | +permissions: {} |
| 17 | + |
12 | 18 | jobs: |
13 | 19 | pyodide-packages: |
14 | 20 | name: Build & Publish rust emscripten-wasm-eh sysroot |
15 | 21 | runs-on: ubuntu-latest |
| 22 | + permissions: |
| 23 | + contents: read |
16 | 24 | timeout-minutes: 360 |
17 | 25 | steps: |
18 | 26 | - name: Checkout |
19 | | - uses: actions/checkout@v4 |
| 27 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 28 | + with: |
| 29 | + persist-credentials: false |
20 | 30 |
|
21 | 31 | - name: free up disk space |
22 | 32 | run: ./free-disk-space.sh |
23 | 33 |
|
24 | 34 | - name: Set up Python |
25 | | - uses: actions/setup-python@v4 |
| 35 | + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 |
26 | 36 | with: |
27 | 37 | python-version: 3.12.8 |
28 | 38 |
|
29 | 39 | - name: Build Rust sysroot |
30 | 40 | run: | |
31 | | - ./main.sh ${{ inputs.emcc_version }} ${{ inputs.rust_nightly_date }} |
| 41 | + ./main.sh ${EMCC_VERSION} ${RUST_NIGHTLY_DATE} |
| 42 | +
|
| 43 | + - name: Sanity check |
| 44 | + run: | |
| 45 | + if [ ! -f emcc-${EMCC_VERSION}_nightly-${RUST_NIGHTLY_DATE}.tar.bz2 ]; then |
| 46 | + echo "emcc-${EMCC_VERSION}_nightly-${RUST_NIGHTLY_DATE}.tar.bz2 not found" |
| 47 | + exit 1 |
| 48 | + fi |
| 49 | +
|
| 50 | + - name: Upload artifact |
| 51 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
| 52 | + with: |
| 53 | + name: rust-emcc-sysroot-${{ github.run_id}} |
| 54 | + path: "*.tar.bz2" |
| 55 | + if-no-files-found: error |
| 56 | + |
| 57 | + publish: |
| 58 | + name: Publish rust emscripten-wasm-eh sysroot |
| 59 | + runs-on: ubuntu-latest |
| 60 | + needs: [pyodide-packages] |
| 61 | + permissions: |
| 62 | + # For attestations |
| 63 | + id-token: write |
| 64 | + attestations: write |
| 65 | + # For creating a release |
| 66 | + contents: write |
| 67 | + steps: |
| 68 | + - name: Download artifact |
| 69 | + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 |
| 70 | + with: |
| 71 | + merge-multiple: true |
| 72 | + |
| 73 | + - name: Generate artifact attestation(s) |
| 74 | + uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3 |
| 75 | + with: |
| 76 | + subject-path: "*.tar.bz2" |
32 | 77 |
|
33 | 78 | - name: Create GitHub Release |
34 | | - uses: ncipollo/release-action@v1 |
| 79 | + uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0 |
35 | 80 | with: |
36 | | - artifacts: "emcc-${{ inputs.emcc_version }}_nightly-${{ inputs.rust_nightly_date }}.tar.bz2" |
37 | | - tag: emcc-${{ inputs.emcc_version }}_nightly-${{ inputs.rust_nightly_date }} |
| 81 | + artifacts: "*.tar.bz2" |
| 82 | + tag: emcc-${{ env.EMCC_VERSION }}_nightly-${{ env.RUST_NIGHTLY_DATE }} |
38 | 83 | draft: false |
39 | 84 | prerelease: false |
0 commit comments