-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (46 loc) · 1.75 KB
/
release.yml
File metadata and controls
56 lines (46 loc) · 1.75 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
name: release
on:
push:
tags:
- '*'
permissions: {}
concurrency:
group: global
cancel-in-progress: false
jobs:
build:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # required for Create Release step
steps:
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: '8.1'
coverage: none
ini-values: phar.readonly=0
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Determine version name
id: get-version
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Update application version
env:
STEPS_GET_VERSION_OUTPUTS_VERSION: ${{ steps.get-version.outputs.version }}
run: sed -i 's/Varnish Plus CLI/Varnish Plus CLI ${STEPS_GET_VERSION_OUTPUTS_VERSION}/g' bin/varnish-plus-cli.php && cat bin/varnish-plus-cli.php
- name: Build phar with makefile
run: make dist
- name: Check if we can run the phar
run: |
./dist/varnish-plus-cli.phar --version
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.get-version.outputs.version }}
run: |
gh release create "$VERSION" ./dist/varnish-plus-cli.phar \
--title "$VERSION" \
--notes "Stable release."