-
-
Notifications
You must be signed in to change notification settings - Fork 379
59 lines (50 loc) · 1.87 KB
/
Copy pathpull_request.yml
File metadata and controls
59 lines (50 loc) · 1.87 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
name: CI-PR
on:
pull_request:
types: [opened, reopened, synchronize, labeled]
permissions:
contents: read
jobs:
permission_check:
runs-on: ubuntu-latest
steps:
- uses: actions-cool/check-user-permission@c21884f3dda18dafc2f8b402fe807ccc9ec1aa5e # v2
id: check-permission
with:
require: write
username: ${{ github.triggering_actor }}
outputs:
require-result: ${{ steps.check-permission.outputs.require-result }}
build:
runs-on: ubuntu-22.04
needs: [permission_check]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Install and run Luacheck
uses: nebularg/actions-luacheck@d4137dd840545b28521ed21931e06913d93c0bc1 # v1
with:
args: "--no-color -q"
annotate: warning
- name: Update Build Date
run: sed -i "s/@build-time@/`date +%Y%m%d%H%M%S`/" WeakAuras/Init.lua
- name: Flag Experimental Build
run: |
sed -i \
-e "s/--\[=====\[@non-experimental@/--@non-experimental@/" \
-e "s/--@end-non-experimental@\]=====\]/--@end-non-experimental/" WeakAuras/Init.lua
- name: Create Package
uses: BigWigsMods/packager@12e08b28e30e3df84cc508525ebfcdf3818ad86c # v2
with:
args: -d
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ needs.permission_check.outputs.require-result == 'true' && contains(github.event.pull_request.labels.*.name, '🆕 Feature Preview')}}
id: upload-artifact
with:
name: WeakAuras-PR#${{ github.event.number }}-${{ github.sha }}
path: .release/*.zip
include-hidden-files: true
archive: false