-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (65 loc) · 2.05 KB
/
repack-and-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches:
- 'main'
- 'master'
- 'v*'
tags:
- v*
pull_request:
workflow_dispatch:
repository_dispatch:
types: [run_build]
jobs:
clean_release:
runs-on: ubuntu-latest
steps:
- name: rebuild release body
if: github.ref == 'refs/heads/main'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "Latest"
title: "Latest development build"
build:
needs: [clean_release]
strategy:
matrix:
toolchain: ["windows-static-x86", "linux-x86", "windows-static-x64", "linux-x64"]
runs-on: ubuntu-latest
container: dockcross/${{ matrix.toolchain }}:latest
steps:
- uses: actions/checkout@v2
- run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
sudo apt-get install --assume-yes p7zip-full
git fetch --prune --unshallow
- name: Compile project
run: |
DATEE=`date '+[%Y-%m-%d]'`
mv LICENSE LICENCE.TXT
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make clean all
7z a -t7z ${{ github.event.repository.name }}-${{ matrix.toolchain }}.7z ../Changes.Log ../LICENCE.TXT ../README.md "${{ github.event.repository.name }}*"
ls -r
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ matrix.toolchain }}
path: |
build/${{ github.event.repository.name }}-${{ matrix.toolchain }}.7z
- name: Deploy pre-release
uses: softprops/action-gh-release@v1
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fail_on_unmatched_files: true
files: |
build/${{ github.event.repository.name }}-${{ matrix.toolchain }}.7z
name: "Latest build"
tag_name: "Latest"
prerelease: true