-
Notifications
You must be signed in to change notification settings - Fork 47
58 lines (47 loc) · 1.64 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:
- 'v*.*.*.*'
jobs:
Build:
runs-on: ubuntu-latest
env:
DALAMUD_HOME: ${{ github.workspace }}/Dalamud/
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Get Environment Variables
run: |
tag=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')
echo "tag=$tag" >> $GITHUB_ENV
if [[ "$tag" == *"-test" ]]; then
branch="testing"
tag=$(echo $tag | sed 's/-test//')
else
branch="latest"
fi
echo "branch=$branch" >> $GITHUB_ENV
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Download Dalamud Latest
run: |
wget https://goatcorp.github.io/dalamud-distrib/latest.zip -O ${{ env.DALAMUD_HOME }}.zip
unzip ${{ env.DALAMUD_HOME }}.zip -d ${{ env.DALAMUD_HOME }}
- 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:InformationalVersion=${{ env.tag }}
- name: Publish Plugin
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: RotationSolverReborn ${{ env.tag }}
tag: ${{ env.tag }}
draft: false
make_latest: ${{ env.branch == 'latest' }}
prerelease: ${{ env.branch == 'testing' }}