Merge remote-tracking branch 'refs/remotes/origin/main' #7
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 | |
# Put your personal access token in a repository secret named PAT for cross-repository access | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
PLUGIN_REPO: BrakusTapus/PluginHUB | |
PROJECT_NAME: BetterTargetingSystemPvP | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 # Updated to v3 | |
with: | |
submodules: recursive | |
- name: Setup MSBuild | |
uses: microsoft/[email protected] # Updated to v1.1 | |
- name: Download Dalamud | |
run: | | |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip | |
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\" | |
- name: Build | |
run: | | |
dotnet restore -r win ${{ env.PROJECT_NAME }}.sln | |
dotnet build --configuration Release | |
env: | |
DOTNET_CLI_TELEMETRY_OUTPUT: true | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 # Updated to v3 | |
with: | |
name: ${{env.PROJECT_NAME}} | |
path: ${{env.PROJECT_NAME}}/bin/x64/Release/${{env.PROJECT_NAME}} | |
if-no-files-found: error | |
release: | |
needs: build | |
runs-on: windows-latest | |
if: "contains(toJSON(github.event.commits.*.message), '[PUSH]') && github.event_name == 'push'" | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 # Updated to v3 | |
with: | |
fetch-depth: 0 | |
- name: Download artifact | |
uses: actions/download-artifact@v3 # Updated to v3 | |
id: download | |
with: | |
name: ${{env.PROJECT_NAME}} | |
- name: Get version | |
id: version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: '${{env.PROJECT_NAME}}.json' | |
prop_path: 'AssemblyVersion' | |
- run: echo ${{steps.version.outputs.prop}} | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ env.PROJECT_NAME }} ${{steps.version.outputs.prop}} | |
tag_name: ${{steps.version.outputs.prop}} | |
body: ${{ github.events.commits[0].message }} | |
files: ./latest.zip | |
- name: Trigger plugin repo update | |
uses: peter-evans/repository-dispatch@v2 # Updated to v2 | |
with: | |
token: ${{ secrets.PAT }} | |
repository: ${{env.PLUGIN_REPO}} | |
event-type: new-release |