1.1.1 #34
Workflow file for this run
This file contains 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: Attach release assets | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build-and-upload-assets: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: zip | |
coverage: none | |
tools: phive | |
- id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- run: composer install --no-interaction --no-dev --optimize-autoloader | |
- run: phive --no-progress install --force-accept-unsigned --trust-gpg-keys 2DF45277AEF09A2F | |
- run: .phive/tools/box compile | |
- name: Smoke test PHAR | |
run: .dist/bdi.phar | |
- name: Configure GPG signing key | |
run: echo "$GPG_SIGNING_KEY" | base64 --decode | gpg --import --no-tty --batch --yes | |
env: | |
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
- name: Sign PHAR | |
run: gpg --command-fd 0 --pinentry-mode loopback -u "$GPG_ID" --batch --detach-sign --output .dist/bdi.phar.asc .dist/bdi.phar | |
env: | |
GPG_ID: ${{ secrets.GPG_ID }} | |
- uses: bruceadams/[email protected] | |
id: get_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: .dist/bdi.phar | |
asset_name: bdi.phar | |
asset_content_type: application/octet-stream | |
- uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: .dist/bdi.phar.asc | |
asset_name: bdi.phar.asc | |
asset_content_type: application/octet-stream | |
- uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.PAT }} | |
repository: dbrekelmans/bdi | |
event-type: release | |
client-payload: '{"tag_name": "${{ steps.get_release.outputs.tag_name }}", "release_name": "${{ steps.get_release.outputs.name }}", "prerelease": "${{ steps.get_release.outputs.prerelease }}"}' |