-
-
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: 8.3
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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
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@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
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