forked from ArchiDog1998/RotationSolver
-
Notifications
You must be signed in to change notification settings - Fork 42
56 lines (44 loc) · 1.76 KB
/
publish.yaml
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
name: Publish
on:
push:
tags:
- '*.*.*.*'
jobs:
Build:
permissions:
contents: write
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v2
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
- name: Get Environment Variables
run: |
$tag = "${{ github.ref }}" -replace 'refs/tags/', ''
"tag=$tag" | Out-File -Append -FilePath $Env:GITHUB_ENV
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Download Dalamud Latest
run: |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
- name: Restore Nuget Packages
run: dotnet restore RotationSolver/RotationSolver.csproj
- name: Build Plugin
run: dotnet build --no-restore -c Release RotationSolver/RotationSolver.csproj -p:AssemblyVersion=${{ env.tag }} -p:FileVersion=${{ env.tag }} -p:PackageVersion=${{ env.tag }} -p:InformationalVersion=${{ env.tag }} --output .\build
- name: Push Nuget Package
run: dotnet nuget push .\build\*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
- name: Zip Plugin
run: Compress-Archive -Path .\build\* -DestinationPath .\build\RotationSolver.zip
- name: Publish Plugin
uses: softprops/action-gh-release@v2
with:
files: ./build/RotationSolver.zip
token: ${{ secrets.GITHUB_TOKEN }}