-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 1.66 KB
/
build.yml
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
name: Build
on:
workflow_dispatch:
push:
branches:
- main
env:
PUBLIC_NAME: Resonant-API7
SOLUTION_NAME: Resonant-API7
INTERNAL_NAME: Resonant-API7
RELEASE_DIR: Resonant\bin\Release
PERSONAL_PLUGIN_REPO: k-kz/DalamudPlugins
PR_PLUGIN_REPO: k-kz/DalamudPlugins
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Download Dalamud
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: Build
run: |
dotnet restore -r win ${{ env.SOLUTION_NAME }}.sln
dotnet build --configuration Release
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
- uses: actions/upload-artifact@v2
with:
name: PluginRepoZip
path: ${{ env.RELEASE_DIR }}
if-no-files-found: error
deploy:
needs: build
if: "contains(toJSON(github.event.commits.*.message), '[PUSH]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: ${{ env.PERSONAL_PLUGIN_REPO }}
token: ${{ secrets.Resonant_API7 }}
- uses: actions/download-artifact@v2
with:
name: PluginRepoZip
path: plugins/${{ env.INTERNAL_NAME }}
- uses: EndBug/add-and-commit@v7
with:
add: --all
author_name: GitHub Action
author_email: github-actions[bot]@users.noreply.github.com
message: Update ${{ env.INTERNAL_NAME }}