Switch to Ubuntu #15
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: | |
push | |
env: | |
PLUGIN_REPO: WorkingRobot/MyDalamudPlugins | |
PROJECT_NAME: Craftimizer | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0' | |
- name: Download Dalamud | |
run: | | |
wget https://goatcorp.github.io/dalamud-distrib/stg/latest.zip | |
unzip latest.zip -d dalamud/ | |
echo "DALAMUD_HOME=$PWD/dalamud" >> $GITHUB_ENV | |
- name: Restore | |
run: | | |
dotnet restore -r win ${{env.PROJECT_NAME}}.sln | |
- name: Build | |
run: | | |
dotnet build --configuration Release | |
- name: Test | |
run: | | |
dotnet test --configuration Release --logger "trx;logfilename=results.trx" --logger "html;logfilename=results.html" --logger "console;verbosity=detailed" --results-directory="TestResults" | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{env.PROJECT_NAME}} | |
path: ${{env.PROJECT_NAME}}/bin/x64/Release/${{env.PROJECT_NAME}} | |
if-no-files-found: error | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
path: TestResults | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
id: release | |
with: | |
files: ${{env.PROJECT_NAME}}/bin/x64/Release/${{env.PROJECT_NAME}}/* | |
- name: Trigger Plugin Repo Update | |
uses: peter-evans/repository-dispatch@v2 | |
if: ${{ steps.release.conclusion == 'success' }} | |
with: | |
token: ${{secrets.PAT}} | |
repository: ${{env.PLUGIN_REPO}} | |
event-type: new-release |