-
-
Notifications
You must be signed in to change notification settings - Fork 14
123 lines (108 loc) · 3.57 KB
/
release.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Release
on:
release:
types: [ published ]
workflow_dispatch:
env:
SOLUTION_NAME: AutoSweep
ZIP_PATH: bin\Release\autoSweep
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/[email protected]
- 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
dotnet build -c Release
- name: Create artifact
uses: actions/upload-artifact@v4
with:
name: ReleaseZip
path: ${{ env.ZIP_PATH }}
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ReleaseZip
path: out
- name: Prepare for release
run: |
mv out/latest.zip out/autoSweep.zip
- name: Update release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
out/autoSweep.zip
out/autoSweep.json
- name: Create artifact
uses: actions/upload-artifact@v4
with:
name: ReleaseArtifact
path: out
- name: Trigger plugin repo update
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: zhudotexe/FFXIV_DalamudPlugins
event-type: new-release
# release-dalamudofficial:
# # on release publish only
# if: github.event_name == 'release'
# needs: build
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
#
# - name: Find Previous Release
# id: findtag
# run: |
# echo ::set-output name=previous_release::$(git tag --sort "-committerdate" | sed -n 2p)
#
# - name: Download artifact
# uses: actions/download-artifact@v2
# with:
# name: ReleaseZip
# path: out
#
# - name: Checkout DalamudPlugins
# uses: actions/checkout@v3
# with:
# repository: 'goatcorp/DalamudPlugins'
# path: DalamudPlugins
#
# - name: Copy dist files
# run: |
# cp out/latest.zip DalamudPlugins/plugins/autoSweep/latest.zip
# cp out/autoSweep.json DalamudPlugins/plugins/autoSweep/autoSweep.json
# cp -r out/images DalamudPlugins/plugins/autoSweep
#
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v4
# with:
# token: ${{ secrets.REPO_ACCESS_TOKEN }}
# path: DalamudPlugins
# commit-message: update PaissaHouse to ${{ github.event.release.tag_name }}
# delete-branch: true
# push-to-fork: zhudotexe/DalamudPlugins
# title: Update PaissaHouse to ${{ github.event.release.name }}
# body: |
# ${{ github.event.release.body }}
#
# *This PR was automatically generated by the PaissaHouse build system ([link to run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}); [diff since last release](https://github.com/${{ github.repository }}/compare/${{ steps.findtag.outputs.previous_release }}...${{ github.event.release.tag_name }})).*