Skip to content

Commit

Permalink
Merge pull request #574 from PHPCSStandards/feature/ghactions-attest-…
Browse files Browse the repository at this point in the history
…phars-for-tags

GH Actions: provide attestations for release PHAR files
  • Loading branch information
jrfnl authored Jul 31, 2024
2 parents e5c46d3 + 51e7828 commit 0855bf2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
runs-on: ubuntu-latest
name: "Build Phar on PHP: 8.0"

permissions:
id-token: write
contents: read
attestations: write

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -39,6 +44,17 @@ jobs:
- name: Build the phar
run: php scripts/build-phar.php

# Provide provenance for generated binaries.
# Only attests the build artifacts which will be used in the published releases as per the guidelines in "what to attest".
# https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds
- name: Generate artifact attestations
if: ${{ github.ref_type == 'tag' }}
uses: actions/attest-build-provenance@v1
with:
subject-path: |
${{ github.workspace }}/phpcs.phar
${{ github.workspace }}/phpcbf.phar
- name: Upload the PHPCS phar
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 0855bf2

Please sign in to comment.