fix: update upload api to https #7
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: .NET Desktop | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'which tag to upload to' | |
default: '' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
targetplatform: ["Any CPU"] | |
runs-on: windows-latest | |
env: | |
Solution_Name: EasyScrShot.sln | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v1 | |
- uses: nuget/setup-nuget@v1 | |
with: | |
nuget-version: '5.x' | |
- name: Restore Nuget packages | |
run: nuget restore $env:Solution_Name | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} | |
- name: Build the Application Project | |
run: msbuild $env:Solution_Name /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:BuildMode /p:AppxBundle=$env:AppxBundle | |
env: | |
AppxBundle: Never | |
BuildMode: SideloadOnly | |
Configuration: ${{ matrix.configuration }} | |
TargetPlatform: ${{ matrix.targetplatform }} | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Package-${{ matrix.configuration }} | |
path: | | |
EasyScrShot\bin\${{ matrix.configuration }}\ | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' | |
with: | |
files: EasyScrShot/bin/${{ matrix.configuration }}/EasyScrShot.exe | |
tag_name: ${{ inputs.tag }} | |
generate_release_notes: false | |
prerelease: true |