Skip to content

Merge pull request #152 from romm/fix/anonymous-class-attribute #19

Merge pull request #152 from romm/fix/anonymous-class-attribute

Merge pull request #152 from romm/fix/anonymous-class-attribute #19

Workflow file for this run

name: Turn tag into release
on:
push:
tags:
- '*.*.*'
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
bundle:
name: Bundle PHAR
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: exif, phar, openssl
coverage: none
ini-values: phar.readonly=Off, error_reporting=-1, display_errors=On, zend.assertions=1
- name: Install Box
run: composer global require humbug/box
- name: Validate configuration
run: box validate -i box.json
- name: Build PHAR
run: box compile -v --config=box.json
- name: Display PHAR info via Box
run: box info -l patchwork.phar
- uses: actions/upload-artifact@v3
with:
name: phar
path: ./patchwork.phar
publish:
name: Add PHAR to release
runs-on: ubuntu-latest
needs:
- bundle
steps:
- uses: actions/download-artifact@v3
with:
name: phar
- name: Draft release
id: upload-release-asset
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: patchwork.phar
draft: true
name: Version %{{ github.ref }}
generate_release_notes: true
regenerate-pages:
name: Trigger update of GitHub Pages branch
runs-on: ubuntu-latest
needs:
- publish
steps:
- name: Checkout GH Pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Configure Git credentials
run: |
git config --global user.name antecedent
git config --global user.email ignas.rudaitis@gmail.com
- name: Commit and push
run: |
git commit --allow-empty -m "Deploy version ${{ github.ref }}"
git push origin gh-pages