Skip to content

3.0.18.52

3.0.18.52 #53

Workflow file for this run

name: Build
# Put your personal access token in a repository secret named PAT for cross-repository access
on:
workflow_dispatch:
push:
branches:
- CN
env:
# PUBLIC_NAME: XIVSlothComboX
SOLUTION_NAME: XIVSlothCombo
INTERNAL_NAME: XIVSlothComboX
RELEASE_DIR: release\XIVSlothComboX
PERSONAL_PLUGIN_REPO: 44451516/MyDalamudPlugins
PR_PLUGIN_REPO: 44451516/MyDalamudPlugins
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://github.com/ottercorp/dalamud-distrib/raw/main/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.SOLUTION_NAME }}.sln
dotnet build --configuration Release
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
- name: Set Timestamp
id: timestamp
run: |
echo "::set-output name=timestamp::$(date +'%Y-%m-%d-%H-%M-%S')"
- uses: actions/upload-artifact@v2
with:
name: "XIVSlothComboX-${{ steps.timestamp.outputs.timestamp }}"
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.XIVCOMBO_TOKEN }}
- uses: actions/download-artifact@v2
with:
name: "XIVSlothComboX-${{ steps.timestamp.outputs.timestamp }}"
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 }}