Skip to content

ops: add missing step names #5

ops: add missing step names

ops: add missing step names #5

Workflow file for this run

---
name: CD
"on":
workflow_call:
inputs:
tag_name:
required: true
type: string
permissions:
id-token: write
contents: read
attestations: read
env:
ZIG_VERSION: 0.13.0
jobs:
release:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Publish release
uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
build-linux:
name: Build / Linux
runs-on: ubuntu-latest
needs: [release]
permissions:
id-token: write
contents: write
attestations: write
strategy:
fail-fast: false
matrix:
target:
- "x86-linux"
- "x86_64-linux"
- "aarch64-linux"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Build
run: |
zig build -Dtarget=${{ matrix.target }} --release=safe
mv zig-out/bin/xtxf xtxf
tar -czvf xtxf-${{ matrix.target}}.tar.gz xtxf
- name: Upload
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ inputs.tag_name }} \
xtxf-${{ matrix.target }}.tar.gz
- name: Attest
uses: actions/attest-build-provenance@v1
with:
subject-path: 'xtxf-${{ matrix.target}}.tar.gz'
- name: Verify attestation
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh attestation verify xtxf-${{ matrix.target}}.tar.gz --owner "$GITHUB_REPOSITORY_OWNER"
build-macos:
name: Build / macOS
runs-on: macos-latest
needs: [release]
permissions:
id-token: write
contents: write
attestations: write
strategy:
fail-fast: false
matrix:
target:
- "x86_64-macos"
- "aarch64-macos"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Build
run: |
zig build -Dtarget=${{ matrix.target }} --release=safe
mv zig-out/bin/xtxf xtxf
tar -czvf xtxf-${{ matrix.target }}.tar.gz xtxf
- name: Upload
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ inputs.tag_name }} \
xtxf-${{ matrix.target }}.tar.gz
- name: Attest
uses: actions/attest-build-provenance@v1
with:

Check failure on line 136 in .github/workflows/cd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cd.yml

Invalid workflow file

You have an error in your yaml syntax on line 136
subject-path: 'xtxf-${{ matrix.target }}.tar.gz':w
- name: Verify attestation
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh attestation verify xtxf-${{ matrix.target }}.tar.gz --owner "$GITHUB_REPOSITORY_OWNER"