-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.31 KB
/
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
name: "Publish"
on:
push:
tags:
- "*"
env:
PROJECT_PATH: ZoomCloser/ZoomCloser.csproj
ZIP_PATH: ZoomCloser/bin/publish/ZoomCloser.zip
EXE_PATH: ZoomCloser/bin/publish/ZoomCloser.exe
LICENSES_PATH: ZoomCloser/bin/publish/LICENSES.md
jobs:
deploy:
runs-on: windows-latest
steps:
- name: Initialize Actions
uses: actions/checkout@v2
- name: Restore Project
run: dotnet restore ${{ env.PROJECT_PATH }}
- name: Publish Project
run: dotnet publish ${{ env.PROJECT_PATH }} -c Release --self-contained -r win-x64 -p:PublishSingleFile=true --no-restore
- name: Create Zip File
uses: papeloto/action-zip@v1
with:
files: ${{ env.EXE_PATH }}
dest: ${{ env.ZIP_PATH }} ${{ env.LICENSES_PATH }}
- name: Initialize Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Create Release
uses: csexton/release-asset-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ZIP_PATH }}
release-url: ${{ steps.create_release.outputs.upload_url }}