-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (75 loc) · 2.62 KB
/
draft-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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