-
-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (43 loc) · 1.88 KB
/
release.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
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Prepare release
run: |
mkdir -p ./build/cps/bin/x64/plugins/cyber_engine_tweaks/mods/ ./build/demo/bin/x64/plugins/cyber_engine_tweaks/mods/ ./build/release/
rm ./png-lua/README.md
cp LICENSE ./demo/demo1/
cp LICENSE ./demo/demo2/
- name: Copy files for CPStyling
run: |
rsync -a ./ ./build/cps/bin/x64/plugins/cyber_engine_tweaks/mods/CPStyling/ --exclude={.git/,build/,.image/,demo/,.gitignore,.github/,README.md}
- name: Copy files for Demos
run: |
rsync -a ./ ./build/demo/bin/x64/plugins/cyber_engine_tweaks/mods/CPStyling/ --exclude={.git/,build/,.image/,demo/,.gitignore,.github/,README.md}
rsync -a ./demo/ ./build/demo/bin/x64/plugins/cyber_engine_tweaks/mods/ --exclude themes/
rsync -a ./demo/themes/ ./build/demo/bin/x64/plugins/cyber_engine_tweaks/mods/CPStyling/themes/
- name: Zip Release
uses: TheDoctor0/[email protected]
with:
filename: ../release/CPStyling_${{ env.RELEASE_VERSION }}.zip
directory: ./build/cps/
- name: Zip Demo
uses: TheDoctor0/[email protected]
with:
filename: ../release/demo_${{ env.RELEASE_VERSION }}.zip
directory: ./build/demo/
- name: Upload Artifacts
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
artifacts: "./build/release/CPStyling_${{ env.RELEASE_VERSION }}.zip, ./build/release/demo_${{ env.RELEASE_VERSION }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}