Test Zip #10
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: Test Zip | |
on: | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: windows-latest | |
steps: | |
# Checkout the repo | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release | |
- name: Create Published Directory | |
run: New-Item -ItemType Directory -Path published | |
- name: Publish | |
run: dotnet publish -c Release -property:PublishDir=published | |
- name: List files | |
run: dir .\published\ | |
- name: List files 2 | |
run: dir published | |
- name: Zip Files | |
run: | | |
Compress-Archive -Path .\published\* -DestinationPath $env:GITHUB_WORKSPACE\app.zip -Force | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Release | |
path: $env:GITHUB_WORKSPACE\app.zip |