-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.26 KB
/
build.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: "Auto Deploy"
on:
push:
tags:
- "auto-deploy/v*"
env:
PROJECT_PATH: "Auto/Auto.csproj"
jobs:
deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
- name: Install dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}
- name: Build
run: dotnet build ${{ env.PROJECT_PATH }}
- name: Build for release and Publish
run: dotnet publish ${{ env.PROJECT_PATH }} -c Release --self-contained -r win-x64 -p:PublishSingleFile=true -o publish
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Auto
path: .\publish
- name: Create Release
uses: ncipollo/[email protected]
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- uses: csexton/release-asset-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pattern: Auto/bin/Release/net9.0/win-x64/publish/*.exe
release-url: ${{ steps.create_release.outputs.upload_url }}