-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.43 KB
/
release.yml
File metadata and controls
49 lines (39 loc) · 1.43 KB
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
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore UnityLongPathPlugin.sln
- name: Build
run: dotnet build UnityLongPathPlugin.sln --configuration Release --no-restore -p:ContinuousIntegrationBuild=true
- name: Prepare artifacts
run: |
New-Item -ItemType Directory -Path artifacts -Force | Out-Null
Copy-Item UnityLongPathPlugin/bin/Release/net46/UnityLongPathPlugin.dll artifacts/UnityLongPathPlugin.dll
Compress-Archive -Path artifacts/UnityLongPathPlugin.dll -DestinationPath artifacts/UnityLongPathPlugin-${{ github.ref_name }}.zip -Force
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: UnityLongPathPlugin-${{ github.ref_name }}
path: artifacts/UnityLongPathPlugin-${{ github.ref_name }}.zip
if-no-files-found: error
- name: Create GitHub release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: artifacts/UnityLongPathPlugin-${{ github.ref_name }}.zip
generate_release_notes: true