-
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (64 loc) · 1.99 KB
/
publish.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
name: Build and Release
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
permissions:
contents: write
env:
Solution_Name: SQLDataTransfer.sln
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
# 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
env:
Configuration: ${{ matrix.configuration }}
- name: Build project
run: msbuild.exe $env:Solution_Name /t:Clean /t:Build /p:Configuration=$env:Configuration /p:OutDir=../publish/win-x64
env:
Configuration: ${{ matrix.configuration }}
- name: see directory
run: dir "publish/win-x64"
- name: Compress files
run: |
7z a SQLDataTransfer.zip "publish/win-x64/*"
- name: see directory
run: dir
# - name: Set Variables
# id: vars
# run: |
# echo "::set-output name=release_date::$(date +%b,\ %d\ %Y)"
- name: Set Variables
id: variables
run: |
echo "release_date=$(date +'%b, %d %Y')" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: |
###### ${{ steps.variables.outputs.release_date }}
![](https://img.shields.io/github/downloads/heliomarpm/SQLDataTransfer/${{ github.ref_name }}/total)
draft: true
prerelease: true
files: |
SQLDataTransfer.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}