Skip to content

Update artifacts

Update artifacts #13

Workflow file for this run

name: Build and Release
permissions:
contents: write
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+' # This will match tags like 5.3.2
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
platform: [x86, x64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.0.2
with:
vs-version: '17.0'
- name: Install vcpkg dependencies
shell: pwsh
run: |
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg integrate install
if ("${{ matrix.platform }}" -eq "x86")
{
.\vcpkg\vcpkg install pe-parse:x86-windows pe-parse:x86-windows-static
}
elseif ("${{ matrix.platform }}" -eq "x64")
{
.\vcpkg\vcpkg install pe-parse:x64-windows pe-parse:x64-windows-static
}
else
{
.\vcpkg\vcpkg install pe-parse:arm64-windows pe-parse:arm64-windows-static
}
- name: Build with MSBuild
run: msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.platform }} WFPCalloutExplorer.sln
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: wfpcalloutexplorer-${{ matrix.platform }}
path: ${{ matrix.platform == 'x86' && 'Win32/Release/*.exe' || format('{0}/Release/*.exe', matrix.platform) }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
body: "Release of WFPCalloutExplorer"
- name: Upload Release Asset x86
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/wfpcalloutexplorer-x86/WFPCalloutExplorer.exe
asset_name: wfpcalloutexplorer-x86.exe
asset_content_type: application/octet-stream
- name: Upload Release Asset x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/wfpcalloutexplorer-x64/WFPCalloutExplorer.exe
asset_name: wfpcalloutexplorer-x64.exe
asset_content_type: application/octet-stream
- name: Upload Release Asset arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/wfpcalloutexplorer-arm64/WFPCalloutExplorer.exe
asset_name: wfpcalloutexplorer-arm64.exe
asset_content_type: application/octet-stream