Skip to content

Build Quickpay 0.1.0 #2

Build Quickpay 0.1.0

Build Quickpay 0.1.0 #2

Workflow file for this run

name: Build release binary
run-name: Build Quickpay ${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: Release version without the v prefix, for example 1.0.0
required: true
type: string
permissions:
contents: read
env:
COMPOSER_ROOT_VERSION: dev-main
concurrency:
group: build-release-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
name: Build Quickpay ${{ inputs.version }}
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
outputs:
version: ${{ steps.release.outputs.version }}
steps:
- name: Validate release request
id: release
shell: bash
env:
RELEASE_VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
if [[ ! "$RELEASE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z]+([.-][0-9A-Za-z]+)*)?$ ]]; then
echo "Version must be MAJOR.MINOR.PATCH with an optional prerelease suffix." >&2
exit 1
fi
echo "version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
with:
ref: ${{ github.sha }}
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.5'
coverage: pcov
extensions: sodium
tools: composer:2.10.2
- name: Build and verify release
shell: bash
env:
RELEASE_VERSION: ${{ steps.release.outputs.version }}
run: scripts/build-release "$RELEASE_VERSION" "$RUNNER_TEMP/quickpay-release"
- name: Upload binary artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: quickpay-${{ steps.release.outputs.version }}
path: |
${{ runner.temp }}/quickpay-release/quickpay
${{ runner.temp }}/quickpay-release/quickpay.sha256
${{ runner.temp }}/quickpay-release/quickpay-${{ steps.release.outputs.version }}.tar.gz
if-no-files-found: error
compression-level: 0
retention-days: 14
attest:
name: Attest PHAR provenance
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
id-token: write
attestations: write
steps:
# Identity-token permission is isolated from Composer and project code.
# This job only downloads and hashes the artifact produced by build.
- name: Download verified build
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: quickpay-${{ needs.build.outputs.version }}
path: ${{ runner.temp }}/quickpay-release
- name: Attest PHAR build provenance
uses: actions/attest@f7c74d28b9d84cb8768d0b8ca14a4bac6ef463e6 # v4.2.0
with:
subject-path: ${{ runner.temp }}/quickpay-release/quickpay