This repository was archived by the owner on Mar 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish PHAR
2
+ on :
3
+ push :
4
+ branches :
5
+ - build-phar
6
+ release :
7
+ types : [created]
8
+ workflow_dispatch :
9
+ inputs :
10
+ tag :
11
+ description : ' Release tag'
12
+ required : true
13
+ jobs :
14
+ publish :
15
+ name : Release PHAR
16
+ runs-on : ubuntu-22.04
17
+ steps :
18
+ - name : Extract the tag version
19
+ id : tag
20
+ run : |
21
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
22
+ GITHUB_REF=${{ github.event.inputs.tag }}
23
+ fi
24
+ echo "tag=${GITHUB_REF##*v}" >> "$GITHUB_OUTPUT"
25
+ - name : Checkout the code
26
+ uses : actions/checkout@v3
27
+ # with:
28
+ # ref: v${{ steps.tag.outputs.tag }}
29
+ - name : Setup PHP
30
+ uses : shivammathur/setup-php@v2
31
+ with :
32
+ php-version : 8.1
33
+ tools : humbug/box
34
+ - name : Install the dependencies
35
+ run : COMPOSER=composer-dev.json composer install --prefer-dist --no-progress
36
+ - name : Create the PHAR file.
37
+ run : box compile --no-parallel
38
+ - name : Upload the PHAR artifact
39
+ uses : actions/upload-artifact@v3
40
+ with :
41
+ name : shift-cli.phar
42
+ path : builds/shift-cli
43
+
44
+ # - name: Upload the PHAR to release
45
+ # run: gh release upload v${{ steps.tag.outputs.tag }} builds/pint.phar
46
+ # env:
47
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments