-
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (50 loc) · 2.64 KB
/
Copy pathdeploy.yml
File metadata and controls
66 lines (50 loc) · 2.64 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Deploy
on:
push:
branches:
- release
jobs:
deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool --version 6.5.1
- name: Calculate Version
id: version
run: |
$version = dotnet-gitversion /output json | ConvertFrom-Json | Select-Object -ExpandProperty MajorMinorPatch
echo "version=$version" >> $env:GITHUB_OUTPUT
echo "GITVERSION_MAJORMINORPATCH=$version" >> $env:GITHUB_ENV
- name: Build
run: dotnet build src/RomManager/RomManager.csproj --configuration Release
- name: Publish Windows (win-x64)
run: dotnet publish src/RomManager/RomManager.csproj --configuration Release --runtime win-x64 --no-self-contained --output ./publish-win
- name: Publish Linux (linux-x64)
run: dotnet publish src/RomManager/RomManager.csproj --configuration Release --runtime linux-x64 --no-self-contained --output ./publish-linux
- name: Install Velopack
run: dotnet tool install --global vpk
- name: Download Old Windows Release
run: |
vpk [win] download github --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} -o ./release
- name: Download Old Linux Release
run: |
vpk [linux] download github --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} -o ./release
- name: Velopack Pack Windows
run: |
vpk [win] pack --packVersion ${{ steps.version.outputs.version }} -u Furesoft_RomManager --packTitle 'Rom Manager' -p ./publish-win --mainExe ./RomManager.exe
- name: Velopack Pack Linux
run: |
vpk [linux] pack --packVersion ${{ steps.version.outputs.version }} -u Furesoft_RomManager --packTitle 'Rom Manager' -p ./publish-linux --mainExe ./RomManager
- name: Velopack Upload Windows
run: |
vpk upload github --channel win --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} --releaseName '${{ steps.version.outputs.version }}' --tag v${{ steps.version.outputs.version }} --merge
- name: Velopack Upload Linux
run: |
vpk upload github --channel linux --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} --releaseName '${{ steps.version.outputs.version }}' --tag v${{ steps.version.outputs.version }} --merge