Merge branch 'workflow' #27
Workflow file for this run
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: Draft Release | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
# branches: [ "main" ] | |
pull_request: | |
# branches: [ "main" ] | |
env: | |
CONFIGURATION: Release | |
PLATFORM: x64 | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: windows-latest | |
env: | |
Solution_Name: MemoGenerator.sln | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=${{ env.CONFIGURATION }} /p:Platform=${{ env.PLATFORM }} | |
- name: Build | |
run: msbuild $env:Solution_Name /p:Configuration=${{ env.CONFIGURATION }} /p:Platform=${{ env.PLATFORM }} | |
- name: Archive | |
run: | | |
cd MemoGenerator/bin/${{ env.PLATFORM }}/Release | |
tar -c -f MemoGenerator-${{ github.ref_name }}-${{ env.PLATFORM }}.zip net6.0-windows10.0.18362.0 | |
# - name: Upload artifact | |
# id: upload-artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# # Name of the artifact to upload. | |
# name: MemoGenerator-${{ github.ref_name }}-${{ env.PLATFORM }} | |
# # A file, directory or wildcard pattern that describes what to upload | |
# path: MemoGenerator/bin/${{ env.PLATFORM }}/Release/net6.0-windows10.0.18362.0/** | |
- name: Debug | |
run: dir | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: MemoGenerator/bin/${{ env.PLATFORM }}/Release/MemoGenerator-${{ github.ref_name }}-${{ env.PLATFORM }}.zip | |
draft: true | |
# create_release: | |
# needs: build | |
# permissions: | |
# contents: write | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/download-artifact@v4 | |
# id: download-artifact | |
# with: | |
# # Name of the artifact to download. | |
# # If unspecified, all artifacts for the run are downloaded. | |
# # Optional. | |
# name: MemoGenerator-${{ github.ref_name }}-${{ env.PLATFORM }} | |
# - name: Debug | |
# run: dir ${{ steps.download-artifact.outputs.download-path }} | |
# - name: Create release | |
# uses: softprops/action-gh-release@v2 | |
# with: | |
# files: ${{ steps.download-artifact.outputs.download-path }}/MemoGenerator-${{ github.ref_name }}-${{ env.PLATFORM }}.zip | |
# draft: true |