-
-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (51 loc) · 2.1 KB
/
release.yml
File metadata and controls
62 lines (51 loc) · 2.1 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
52
53
54
55
56
57
58
59
60
61
62
name: PHPDrafter release
on:
release:
types: [created, edited]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
with:
php-version: 8.2
ini-values: assert.exception=1, phar.readonly=0, zend.assertions=1
extensions: curl, json, phar, mbstring, gzip, bzip2, openssl
tools: pecl, phing
coverage: none
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
- name: Compile phar
run: phing phar
- name: Shasum builds
run: sha256sum build/out/*
- name: Upload binary to release
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # 2.11.3
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/out/phpdraft-${{ github.event.release.tag_name }}.phar
asset_name: phpdraft-${{ github.event.release.tag_name }}.phar
tag: ${{ github.event.release.tag_name }}
overwrite: false
- name: Upload library to release
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # 2.11.3
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/out/phpdraft-library-${{ github.event.release.tag_name }}.phar
asset_name: phpdraft-library-${{ github.event.release.tag_name }}.phar
tag: ${{ github.event.release.tag_name }}
overwrite: false