Skip to content

Fixed release artifact deployment. #3

Fixed release artifact deployment.

Fixed release artifact deployment. #3

Workflow file for this run

name: Release PHP
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release-php:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Install dependencies
run: composer install
- name: Build PHAR
run: composer build
- name: Test PHAR
run: ./.build/git-artifact --help || exit 1
- name: Get tag name
id: get-version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
./.build/git-artifact