-
Notifications
You must be signed in to change notification settings - Fork 0
/
zip.yml
54 lines (43 loc) · 1.3 KB
/
zip.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
50
51
52
53
54
name: Generate Zip
on:
workflow_dispatch:
inputs:
ref:
description: 'Git Commit Ref (branch, tag, or hash)'
default: 'main'
required: true
type: string
production:
description: 'Is this a production build?'
default: false
type: boolean
jobs:
generate-zip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: install pup
run: composer -- pup
- name: pup build
run: composer -- pup build
- name: pup check
run: composer -- pup check
- name: pup i18n
run: composer -- pup i18n
- name: get version
if: ${{ inputs.production }}
run: echo "VERSION=$(composer -- pup get-version)" >> $GITHUB_ENV
- name: get dev version
if: ${{ !inputs.production }}
run: echo "VERSION=$(composer -- pup get-version --dev)" >> $GITHUB_ENV
- name: get zip name
run: echo "ZIP_NAME=$(composer -- pup zip-name ${{ env.VERSION }})" >> $GITHUB_ENV
- name: pup package
run: composer -- pup package ${{ env.VERSION }}
- name: Upload plugin artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ZIP_NAME }}
path: .pup-zip