-
Notifications
You must be signed in to change notification settings - Fork 9
128 lines (105 loc) · 4.35 KB
/
package.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Package
permissions:
contents: write
on:
push:
branches: main
jobs:
release:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, '[')"
steps:
- name: Install Checkout
uses: actions/checkout@v1
- name: Install Setup SP
uses: rumblefrog/setup-sp@master
with:
version: '1.11.x'
- name: Get GitHub Env
run: |
echo "PLUGIN_VERSION_REVISION<<EOF" >> $GITHUB_ENV
git rev-list --count HEAD >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Install Misc
run: |
bash scripts/setup.sh
bash scripts/optional.sh
working-directory: ./
- name: Full Compile
run: |
mkdir -p plugins
spcomp -E -O2 -v2 -i "include" -o "plugins/freak_fortress_2" freak_fortress_2.sp
spcomp -E -O2 -v2 -i "include" -o "plugins/ff2r_default_abilities" ff2r_default_abilities.sp
spcomp -E -O2 -v2 -i "include" -o "plugins/ff2r_epic_abilities" ff2r_epic_abilities.sp
spcomp -E -O2 -v2 -i "include" -o "plugins/ff2r_menu_abilities" ff2r_menu_abilities.sp
working-directory: ${{ env.SCRIPTS_PATH }}
- name: Setup Package
run: bash scripts/package.sh
- name: Package Full
uses: montudor/action-zip@v1
if: "contains(github.event.head_commit.message, '[M]')"
with:
args: zip -qq -r New-Install-Package-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}.zip New-Install-Package
- name: Package Update
uses: montudor/action-zip@v1
if: "contains(github.event.head_commit.message, '[M]')"
with:
args: zip -qq -r Update-Package-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}.zip Update-Package
- name: Package Epic Scout
uses: montudor/action-zip@v1
if: "contains(github.event.head_commit.message, '[E]')"
with:
args: zip -qq -r Epic-Scout-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}.zip Epic-Scout
- name: Release
uses: softprops/action-gh-release@master
with:
tag_name: ${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}
files: |
New-Install-Package-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}.zip
Update-Package-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}.zip
Epic-Scout-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}.zip
nonrelease:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[')"
steps:
- name: Install Checkout
uses: actions/checkout@v1
- name: Install Setup SP
uses: rumblefrog/setup-sp@master
with:
version: '1.11.x'
- name: Get GitHub Env
run: |
echo "PLUGIN_VERSION_REVISION<<EOF" >> $GITHUB_ENV
git rev-list --count HEAD >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Install Misc
run: |
bash scripts/setup.sh
bash scripts/optional.sh
working-directory: ./
- name: Full Compile
run: |
mkdir -p plugins
spcomp -E -O2 -v2 -i "include" -o "plugins/freak_fortress_2" freak_fortress_2.sp
spcomp -E -O2 -v2 -i "include" -o "plugins/ff2r_default_abilities" ff2r_default_abilities.sp
spcomp -E -O2 -v2 -i "include" -o "plugins/ff2r_epic_abilities" ff2r_epic_abilities.sp
spcomp -E -O2 -v2 -i "include" -o "plugins/ff2r_menu_abilities" ff2r_menu_abilities.sp
working-directory: ${{ env.SCRIPTS_PATH }}
- name: Setup Package
run: bash scripts/package.sh
- name: Upload Full
uses: actions/upload-artifact@master
with:
name: New-Install-Package-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}
path: ./New-Install-Package
- name: Upload Update
uses: actions/upload-artifact@master
with:
name: Update-Package-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}
path: ./Update-Package
- name: Upload Epic Scout
uses: actions/upload-artifact@master
with:
name: Epic-Scout-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}}
path: ./Epic-Scout