Build #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
tags: | |
- '*' | |
pull_request: | |
branches: [main] | |
env: | |
PROJECT_NAME: Neko Fans | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1 | |
- name: Download Dalamud | |
run: | | |
Invoke-WebRequest -Uri https://github.com/goatcorp/dalamud-distrib/raw/main/apiX/latest.zip -OutFile latest.zip | |
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\" | |
- name: Build | |
run: | | |
dotnet restore | |
dotnet restore NekoLewd/NekoLewd.csproj | |
dotnet build Neko --configuration Release --nologo --output bin/Neko/ | |
dotnet build NekoLewd/NekoLewd.csproj --configuration Release --nologo --output bin/NekoLewd/ | |
env: | |
DOTNET_CLI_TELEMETRY_OUTPUT: true | |
- name: Create artifacts | |
run: | | |
Copy-Item "bin/Neko/Neko/latest.zip" -Destination NekoFans.zip | |
Compress-Archive -Path "bin/NekoLewd/*" -DestinationPath NekoFansLewd.zip | |
- name: Upload artifacts | |
uses: actions/[email protected] | |
with: | |
name: PluginZip | |
path: Neko*.zip | |
if-no-files-found: error | |
release: | |
needs: build | |
runs-on: windows-latest | |
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' | |
steps: | |
- name: Checkout repo | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
id: download | |
with: | |
name: PluginZip | |
- name: Display structure of downloaded artifacts | |
run: ls -R | |
- name: Get tag name | |
id: tag | |
uses: WyriHaximus/github-action-get-previous-tag@v1 | |
- name: Create release | |
uses: softprops/[email protected] | |
with: | |
name: ${{ env.PROJECT_NAME }} ${{ steps.tag.outputs.tag }} | |
tag_name: ${{ steps.tag.outputs.tag }} | |
body: ${{ github.events.commits[0].message }} | |
fail_on_unmatched_files: true | |
files: | | |
${{ steps.download.outputs.download-path }}\NekoFans.zip | |
${{ steps.download.outputs.download-path }}\NekoFansLewd.zip | |
- name: Trigger plugin repo update | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.PAT }} | |
repository: Meisterlala/NekoFans | |
event-type: new-release |