Create push.yml [ci build] #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main Workflow | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
if: "contains(github.event.head_commit.message, '[ci build]') || github.event_name == 'release'" | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
Configuration: [Release] | |
Platform: [x64] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Add nuget to PATH | |
uses: nuget/setup-nuget@v2 | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Nuget Restore | |
run: nuget restore | |
- name: MSBuild | |
shell: cmd | |
run: | | |
msbuild LuaDkmDebugger17.sln /t:Rebuild /p:Configuration=${{ matrix.Configuration }} /p:Platform=${{ matrix.Platform }} /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal | |
- name: Upload OGSR artifact | |
uses: actions/[email protected] | |
with: | |
name: LuaDkmDebugger17.vsix | |
path: .\LuaDkmDebugger17\bin\${{ matrix.Configuration }}\LuaDkmDebugger17.vsix | |
- name: Upload release asset | |
if: github.event_name == 'release' | |
uses: Czuz/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: .\LuaDkmDebugger17\bin\${{ matrix.Configuration }}\LuaDkmDebugger17.vsix | |
asset_name: LuaDkmDebugger17.vsix | |
asset_content_type: application/zip |