-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.46 KB
/
release.yml
File metadata and controls
50 lines (42 loc) · 1.46 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
50
name: Release on main
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore
run: dotnet restore WarframeLauncher.sln
- name: Publish (win-x64)
run: dotnet publish src/WarframeLauncher/WarframeLauncher.csproj -c Release -r win-x64 --self-contained false /p:PublishSingleFile=true
- name: Archive publish output
shell: pwsh
run: |
$publishPath = "src/WarframeLauncher/bin/Release/net6.0-windows/win-x64/publish"
if (-not (Test-Path $publishPath)) {
Write-Error "Publish output not found at $publishPath"
}
$artifactName = "LaunchFrame-win-x64.zip"
Compress-Archive -Path "$publishPath/*" -DestinationPath $artifactName -Force
"artifact_path=$artifactName" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: auto-main-${{ github.run_id }}
name: LaunchFrame auto main ${{ github.run_id }}
body: |
Automated build from main.
Commit: ${{ github.sha }}
files: ${{ env.artifact_path }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}