name: Release Artifacts on: workflow_dispatch: inputs: ref: description: Git ref to package. Defaults to the workflow branch. required: false type: string push: tags: - 'v*' jobs: package: name: Package (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - ubuntu-latest - macos-latest - windows-latest steps: - name: Checkout if: ${{ github.event_name != 'workflow_dispatch' || inputs.ref == '' }} uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Checkout requested ref if: ${{ github.event_name == 'workflow_dispatch' && inputs.ref != '' }} uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: ref: ${{ inputs.ref }} - name: Setup Go uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff with: go-version-file: go.mod cache: true - name: Test run: go test ./... - name: Package release artifact run: go run ./cmd/zero-release package - name: Verify release checksums run: go run ./cmd/zero-release verify - name: Upload package uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: zero-${{ runner.os }}-${{ runner.arch }} path: dist/release/* if-no-files-found: error