Repository navigation
Publish attested main archive as rolling release #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Attested main-branch archive | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| attestations: write | |
| jobs: | |
| archive-main: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out main | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| - name: Verify module payload | |
| shell: bash | |
| run: | | |
| test -f semantic-webview2.smod | |
| test -f LICENSE.md | |
| test -d semantic | |
| test -d source | |
| test "$(find semantic -type f -name '*.se' | wc -l)" -gt 0 | |
| test "$(find semantic -type f -name '*.spz' | wc -l)" -gt 0 | |
| test "$(find source -type f | wc -l)" -gt 0 | |
| - name: Create main archive | |
| shell: bash | |
| run: | | |
| rm -rf dist staging | |
| mkdir -p staging/semantic-webview2 dist | |
| git archive --format=tar HEAD | tar -xf - -C staging/semantic-webview2 | |
| (cd staging && zip -qr "../dist/semantic-webview2-main-${GITHUB_SHA}.zip" semantic-webview2) | |
| sha256sum "dist/semantic-webview2-main-${GITHUB_SHA}.zip" > dist/SHA256SUMS.txt | |
| printf 'commit=%s\n' "$GITHUB_SHA" > dist/MAIN_COMMIT.txt | |
| du -h "dist/semantic-webview2-main-${GITHUB_SHA}.zip" | |
| cat dist/SHA256SUMS.txt | |
| - name: Attest main archive | |
| uses: actions/attest-build-provenance@v2 | |
| with: | |
| subject-path: dist/semantic-webview2-main-${{ github.sha }}.zip | |
| - name: Publish main branch release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: main-latest | |
| target_commitish: main | |
| name: Semantic WebView2 main | |
| body: | | |
| Rolling release built from the current `main` branch. | |
| Source commit: `${{ github.sha }}` | |
| The ZIP is attested with GitHub Artifact Attestations. | |
| make_latest: true | |
| files: | | |
| dist/semantic-webview2-main-${{ github.sha }}.zip | |
| dist/SHA256SUMS.txt | |
| dist/MAIN_COMMIT.txt | |
| - name: Upload attested main archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: semantic-webview2-main-${{ github.sha }} | |
| path: | | |
| dist/semantic-webview2-main-${{ github.sha }}.zip | |
| dist/SHA256SUMS.txt | |
| dist/MAIN_COMMIT.txt | |
| if-no-files-found: error | |
| retention-days: 90 | |