-
-
Notifications
You must be signed in to change notification settings - Fork 35
95 lines (78 loc) · 3.16 KB
/
main.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
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Backup storage/app folder
run: cp -r storage/app storage/app_backup
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 17
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-suggest
- name: Install NPM dependencies
run: npm install
- name: Compile assets
run: npm run build
- name: Copy default env
run: cp .env.example .env
- name: Generate Key
run: php artisan key:generate --force
- name: Restore storage/app folder
run: cp -r storage/app_backup/* storage/app/
- name: Zip Project Contents
run: zip -r cssbans.v${{ github.ref_name }}.zip .
- name: Create Draft Release with Specific File Name and Generate Release Notes
id: create_release
uses: ncipollo/[email protected]
with:
artifacts: "cssbans.v${{ github.ref_name }}.zip"
bodyFile: "body.md"
draft: true
generate_release_notes: true
- name: Download Windows Zip from CDN
run: curl -L -o serverlistplayersfix_windows.zip https://github.com/counterstrikesharp-panel/css-bans/releases/download/1.1.4/serverlistplayersfix_windows.zip
- name: Download Linux Zip from CDN
run: curl -L -o serverlistplayersfix_linux.zip https://github.com/counterstrikesharp-panel/css-bans/releases/download/1.1.4/serverlistplayersfix_linux.zip
- name: Download Simple Admin Asset
run: curl -L -o CS2-SimpleAdmin.zip https://github.com/daffyyyy/CS2-SimpleAdmin/releases/download/build-185/CS2-SimpleAdmin.zip
- name: Upload Plugin Zip as Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CS2-SimpleAdmin.zip
asset_name: CS2-SimpleAdmin.zip
asset_content_type: application/zip
- name: Upload Windows Zip as Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./serverlistplayersfix_windows.zip
asset_name: serverlistplayersfix_windows.zip
asset_content_type: application/zip
- name: Upload Linux Zip as Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./serverlistplayersfix_linux.zip
asset_name: serverlistplayersfix_linux.zip
asset_content_type: application/zip