aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build-release.yaml
blob: 40b22efce86673dad35c16d9b1199415b58dab91 (plain)
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
name: Build and Release SharpRIDHijack

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: write

jobs:
  build-and-release:
    runs-on: windows-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Setup MSBuild
        uses: microsoft/setup-msbuild@v2
        with:
          msbuild-version: '17.0'

      - name: Setup NuGet
        uses: nuget/setup-nuget@v2

      - name: Restore NuGet packages
        run: nuget restore SharpRIDHijack.sln

      - name: Build solution (AnyCPU)
        run: msbuild SharpRIDHijack.sln /p:Configuration=Release /p:Platform="Any CPU"

      - name: Build solution (x64)
        run: msbuild SharpRIDHijack.sln /p:Configuration=Release /p:Platform=x64

      - name: Build solution (x86)
        run: msbuild SharpRIDHijack.sln /p:Configuration=Release /p:Platform=x86

      - name: Collect binaries
        run: |
          mkdir build
          Copy-Item -Path "SharpRIDHijack\bin\Release\SharpRIDHijack.exe" -Destination "build\SharpRIDHijack-AnyCPU.exe"
          Copy-Item -Path "SharpRIDHijack\bin\x64\Release\SharpRIDHijack.exe" -Destination "build\SharpRIDHijack-x64.exe"
          Copy-Item -Path "SharpRIDHijack\bin\x86\Release\SharpRIDHijack.exe" -Destination "build\SharpRIDHijack-x86.exe"

      - name: Release
        uses: softprops/action-gh-release@v2
        with:
          files: build/*
          draft: false
          prerelease: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}