chore: release v1.1.0 #11
Workflow file for this run
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: release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: install rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: x86_64-unknown-linux-musl | |
| - name: cache rust toolchain | |
| uses: Swatinem/rust-cache@v2 | |
| - name: install musl-tools | |
| run: sudo apt-get update && sudo apt-get install -y musl-tools | |
| - name: cargo build | |
| run: cargo build --release --target x86_64-unknown-linux-musl | |
| - name: create release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| cp target/x86_64-unknown-linux-musl/release/dispatch dispatch-linux-x86_64 | |
| gh release delete --yes ${{ github.ref_name }} || true | |
| gh release create --generate-notes ${{ github.ref_name }} dispatch-linux-x86_64 | |
| example: | |
| name: example | |
| runs-on: ubuntu-latest | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: download warm.efi | |
| run: | | |
| mkdir -p assets | |
| gh release download v1.0.0 \ | |
| --repo AMDEPYC/uefi-reset \ | |
| --pattern "warm.efi" \ | |
| --dir assets/ | |
| - name: create workloads | |
| run: | | |
| for i in `seq 0 9`; do | |
| cp assets/warm.efi assets/workload-$i.efi | |
| done | |
| rm assets/warm.efi | |
| - name: create release | |
| run: | | |
| # Update the example tag to the release tag | |
| gh release delete --yes example || true | |
| git tag -f example | |
| git push -f origin example | |
| gh release create example \ | |
| --title "Example" \ | |
| --notes-file EXAMPLE.md \ | |
| --prerelease | |
| # Get the upload URL from the release | |
| UPLOAD_URL=$(gh api "repos/${{ github.repository }}/releases/tags/example" --jq '.upload_url' | sed 's/{?name,label}//') | |
| echo "Upload URL: $UPLOAD_URL" | |
| # Upload each workload EFI binary with dispatch content type | |
| for workload_file in assets/workload-*.efi; do | |
| filename=$(basename "$workload_file") | |
| curl -X POST \ | |
| --fail \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer ${{ github.token }}" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| -H "Content-Type: application/vnd.dispatch+efi" \ | |
| --data-binary "@$workload_file" \ | |
| "$UPLOAD_URL?name=$filename" | |
| done |