-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.16 KB
/
release.yml
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
# yamllint disable-line rule:document-start
name: release
# yamllint disable-line rule:truthy
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build release
run: composer run-script release:build
- uses: actions/upload-artifact@v4
with:
name: gf-sagepay
path: release/*.zip
lint-wp-org:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: gf-sagepay
- run: unzip gf-sagepay.zip -d /tmp/plugin-source-code
- run: find /tmp/plugin-source-code -name "*.php" -print0 | xargs -n 1 -0 php -l
publish-to-github-releases:
runs-on: ubuntu-latest
needs: lint-wp-org
steps:
- uses: actions/download-artifact@v4
with:
name: gf-sagepay
- name: Create release
run: gh release create "${GITHUB_REF/refs\/tags\//}" gf-sagepay.zip --generate-notes