Update README.md #112
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: | |
- master | |
env: | |
PUBLIC_NAME: Something Need Doing | |
SOLUTION_NAME: SomethingNeedDoing | |
INTERNAL_NAME: SomethingNeedDoing | |
RELEASE_DIR: SomethingNeedDoing\bin\Release\SomethingNeedDoing | |
PERSONAL_PLUGIN_REPO: daemitus/MyDalamudPlugins | |
PR_PLUGIN_REPO: daemitus/DalamudPlugins | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup MSBuild | |
uses: microsoft/[email protected] | |
- name: Download Dalamud | |
run: | | |
# Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip | |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip | |
Expand-Archive -Verbose -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.PAT }} | |
- 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 }} | |
# pull_request: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Download artifact | |
# uses: actions/download-artifact@v2 | |
# id: download-artifact | |
# with: | |
# name: PluginRepoZip | |
# path: PluginArtifact | |
# - uses: daemitus/DalamudPluginPR@master | |
# with: | |
# token: ${{ secrets.PAT }} | |
# artifact_path: ${{ steps.download-artifact.outputs.download-path }} |