-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.26 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (42 loc) · 1.26 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
name: Release
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
build-release-zip:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
- name: Run tests
run: php tests/run.php
- name: Validate readme metadata
run: php tests/validate-readme.php
- name: Lint PHP files
run: find . -path ./.git -prune -o -path ./dist -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l
- name: Build plugin ZIP
run: bash scripts/build-release.sh
- name: Validate plugin ZIP
run: python3 scripts/validate-release-zip.py
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: snxworks-safe-staging-guard
path: dist/snxworks-safe-staging-guard.zip
- name: Publish GitHub release asset
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/snxworks-safe-staging-guard.zip
generate_release_notes: true