This repository was archived by the owner on Jan 28, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.59 KB
/
publish-phar.yml
File metadata and controls
51 lines (43 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Publish the released PHAR
on:
release:
types: [ created ]
workflow_dispatch:
inputs:
tag:
description: 'Tag release version'
required: true
jobs:
publish:
runs-on: ubuntu-latest
name: Release PHAR
steps:
- name: Extract the tag version
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
GITHUB_REF=${{ github.event.inputs.tag }}
fi
echo "tag=${GITHUB_REF##*v}" >> "$GITHUB_OUTPUT"
- name: Checkout the code
uses: actions/checkout@v6
with:
submodules: true
ref: v${{ steps.tag.outputs.tag }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: curl, mbstring, zip, iconv, json, dom, fileinfo, tokenizer
ini-values: error_reporting=E_ALL
coverage: none
- name: Upload the PHAR artifact
uses: actions/upload-artifact@v6
with:
name: paw.phar
path: builds/paw
- name: Rename file
run: mv builds/paw builds/paw.phar
- name: Upload the PHAR to release
run: gh release upload ${{ steps.tag.outputs.tag }} builds/paw.phar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}