Skip to content

Commit d6ad1d7

Browse files
Reapply #1 (#3)
* Reapply "Fixes from `zizmor` + add attestations and Dependabot config (#1)" This reverts commit 0305f0b. * Reapply "Bump actions/attest-build-provenance in the actions group (#2)" This reverts commit 5355961. * Fix artifact upload name * Allow creating a release * Pass envs to release tag
1 parent 0305f0b commit d6ad1d7

File tree

2 files changed

+62
-6
lines changed

2 files changed

+62
-6
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"

.github/workflows/main.yaml

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,76 @@ on:
99
description: Rust nightly date
1010
required: true
1111

12+
env:
13+
EMCC_VERSION: ${{ inputs.emcc_version }}
14+
RUST_NIGHTLY_DATE: ${{ inputs.rust_nightly_date }}
15+
16+
permissions: {}
17+
1218
jobs:
1319
pyodide-packages:
1420
name: Build & Publish rust emscripten-wasm-eh sysroot
1521
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
1624
timeout-minutes: 360
1725
steps:
1826
- name: Checkout
19-
uses: actions/checkout@v4
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2030

2131
- name: free up disk space
2232
run: ./free-disk-space.sh
2333

2434
- name: Set up Python
25-
uses: actions/setup-python@v4
35+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
2636
with:
2737
python-version: 3.12.8
2838

2939
- name: Build Rust sysroot
3040
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"
3277

3378
- name: Create GitHub Release
34-
uses: ncipollo/release-action@v1
79+
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
3580
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 }}
3883
draft: false
3984
prerelease: false

0 commit comments

Comments
 (0)