-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (51 loc) · 2.52 KB
/
dev-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
name: Dev Release
on: [push, workflow_dispatch]
env:
BUILD_TYPE: RelWithDebInfo
jobs:
dev-release:
runs-on: windows-latest
strategy:
matrix:
target: [ff7remake_]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- name: Configure CMake
run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ${{matrix.target}}
- name: Upload artifacts
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: ${{matrix.target}}
path: |
${{github.workspace}}/build/${{env.BUILD_TYPE}}/*
if-no-files-found: error
- name: Compress artifacts
run: |
echo ${{github.sha}} > ${{github.workspace}}/revision.txt
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/ff7remake_/config.txt
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/build/${{env.BUILD_TYPE}}/${{matrix.target}}.dll
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/build/${{env.BUILD_TYPE}}/${{matrix.target}}.pdb
7z rn ${{github.workspace}}/${{matrix.target}}.zip ${{matrix.target}}.dll plugins/${{matrix.target}}.dll
7z rn ${{github.workspace}}/${{matrix.target}}.zip ${{matrix.target}}.pdb plugins/${{matrix.target}}.pdb
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/revision.txt
- name: Hash zip
run: |
$ReleaseHash = Get-FileHash -Algorithm SHA256 ${{github.workspace}}/${{matrix.target}}.zip
$ReleaseHash.Hash | Out-File -FilePath ${{github.workspace}}/${{matrix.target}}.zip.sha256
- name: Create Release
if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5
with:
repo: FF7R-UEVR
owner: praydog
name: ${{format('Release {0} ({1})', github.run_number, github.sha)}}
tag: ${{format('run-{0}', github.run_number)}}
token: ${{ secrets.FF7R_RELEASER }}
artifacts: "${{github.workspace}}/${{matrix.target}}.zip,${{github.workspace}}/${{matrix.target}}.zip.sha256"
makeLatest: true
bodyFile: ${{github.workspace}}/README.md