Skip to content

Commit

Permalink
Github Workflow: CI release Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Edi61 authored Mar 3, 2023
1 parent 262c236 commit cf2b714
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/AntiDupl_CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: AntiDupl CI Build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static

jobs:

build:

strategy:
matrix:
configuration: [Debug, Release]

runs-on: windows-latest

env:
Solution_Name: ./src/AntiDupl.sln

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup MSBuild.exe
uses: microsoft/[email protected]

- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.Solution_Name}}

- name: Run and cache vcpkg dependecies
uses: lukka/[email protected]
with:
vcpkgGitCommitId: 223d33be7d3ec6c3d64381ca37f501b8c87dda6a
vcpkgJsonGlob: src/vcpkg.json
runVcpkgInstall: false
appendedCacheKey: '${{matrix.configuration}}'

- name: Integrate vcpkg
working-directory: ${{env.VCPKG_ROOT}}
run: |
${{ github.workspace }}/vcpkg/vcpkg.exe integrate install
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=$env:Configuration $env:Solution_Name
env:
Configuration: ${{ matrix.configuration }}

- name: Make release binary and source files
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cd cmd
.\MakeBin.cmd
.\MakeSrc.cmd
- if: matrix.configuration == 'Release'
name: Upload build
uses: actions/upload-artifact@v3
with:
name: AntiDupl.NET-2.3.11 build
path: |
${{ github.workspace }}\out\bin\AntiDupl.NET-2.3.11.exe
${{ github.workspace }}\out\bin\AntiDupl.NET-2.3.11.exe.hash.txt
${{ github.workspace }}\out\bin\AntiDupl.NET-2.3.11.7z
${{ github.workspace }}\out\bin\AntiDupl.NET-2.3.11.7z.hash.txt
- name: Upload source
uses: actions/upload-artifact@v3
with:
name: AntiDupl.NET-2.3.11 sources
path: |
${{ github.workspace }}\out\src\AntiDupl.NET-2.3.11_Sources.7z
${{ github.workspace }}\out\src\AntiDupl.NET-2.3.11_Sources.7z.hash.txt

0 comments on commit cf2b714

Please sign in to comment.