-
-
Notifications
You must be signed in to change notification settings - Fork 46
70 lines (58 loc) · 1.93 KB
/
build.yml
File metadata and controls
70 lines (58 loc) · 1.93 KB
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
name: Build
on:
push:
branches:
- master
tags:
- v*
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: windows-2022
strategy:
matrix:
build_type: [ Debug, Release ]
arch: [ Win32, x64 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
run: .\build.ps1 -mode ${{ matrix.build_type }} -arch ${{ matrix.arch }}
- name: Set variables
run: |
echo "PROXINJECT_VERSION=$(git describe --tags)" >> $Env:GITHUB_ENV
echo "SHORT_SHA=$('${{ github.sha }}'.Substring(0,7))" >> $Env:GITHUB_ENV
- name: Upload
uses: actions/upload-artifact@v3.0.0
with:
name: proxinject-snapshot-${{ env.SHORT_SHA }}-${{ matrix.build_type }}-${{ matrix.arch }}
path: |
${{github.workspace}}\release
retention-days: 30
- name: Pack
run: |
makensis /DVERSION=${{ env.PROXINJECT_VERSION }} .\setup.nsi
if: ${{ matrix.build_type == 'Release' }}
- name: Upload Package
if: ${{ matrix.build_type == 'Release' }}
uses: actions/upload-artifact@v3.0.0
with:
name: proxinject-snapshot-${{ env.SHORT_SHA }}-${{ matrix.arch }}-installer
path: |
${{github.workspace}}\proxinjectSetup.exe
retention-days: 30
- name: Rename for Release
if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.build_type == 'Release' }}
run: |
mv proxinjectSetup.exe proxinjectSetup-${{ env.PROXINJECT_VERSION }}-${{ matrix.arch }}.exe
Compress-Archive release proxinject-${{ env.PROXINJECT_VERSION }}-${{ matrix.arch }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.build_type == 'Release' && matrix.arch == 'x64' }}
with:
prerelease: true
files: |
proxinjectSetup*.exe
proxinject*.zip