Create main.yml

This commit is contained in:
qwqdanchun 2023-05-16 00:17:50 +08:00 committed by GitHub
parent c41bb0436c
commit 3eda11502a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 110 additions and 0 deletions

110
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,110 @@
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Install NuGet Packages
run: nuget restore CVE-2023-27363.sln
- name: Build solution
run: msbuild -nologo -v:m -p:Configuration=${{ matrix.configuration }} CVE-2023-27363.sln
- name: Delete-tag-and-release
uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
delete_release: true
tag_name: AutoBuild
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: AutoBuild
release_name: AutoBuild
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Upload Release Exe
id: upload-release-exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./CVE-2023-27363/bin/Release/CVE-2023-27363.exe
asset_name: CVE-2023-27363.exe
asset_content_type: application/exe