diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index bf5b87b..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -ko_fi: ArchiTed \ No newline at end of file diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..a594d22 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,47 @@ +name: Publish +on: + push: + tags: + - '*.*.*.*' +jobs: + Build: + permissions: + contents: write + runs-on: windows-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: true + + - name: Get Environment Variables + run: | + $tag = "${{ github.ref }}" -replace 'refs/tags/', '' + + "tag=$tag" | Out-File -Append -FilePath $Env:GITHUB_ENV + + - name: Set up .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.0.x + + - name: Download Dalamud Latest + run: | + Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip + Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev" + + - name: Restore Nuget Packages + run: dotnet restore ActionTimelineEx/ActionTimelineEx.csproj + + - name: Build Plugin + run: dotnet build --no-restore -c Release ActionTimelineEx/ActionTimelineEx.csproj -p:AssemblyVersion=${{ env.tag }} -p:FileVersion=${{ env.tag }} -p:InformationalVersion=${{ env.tag }} --output .\build + + - name: Zip Plugin + run: Compress-Archive -Path .\build\* -DestinationPath .\build\ActionTimelineReborn.zip + + - name: Publish Plugin + uses: softprops/action-gh-release@v2 + with: + files: ./build/ActionTimelineReborn.zip + token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index dba341f..0000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,79 +0,0 @@ -on: - push: - branches: - - main -name: release-please -jobs: - release-please: - name : releasePlz - if : ${{ startsWith(github.event.head_commit.message, 'chore:') || startsWith(github.event.head_commit.message, 'Merge pull request')}} - runs-on: ubuntu-latest - outputs: - released: ${{ steps.rp.outputs.releases_created }} - upload_url: ${{ steps.rp.outputs.upload_url }} - steps: - - id: rp - uses: google-github-actions/release-please-action@v3 - with: - release-type: node - package-name: release-please-action - - build: - name : build - needs: release-please - if: ${{ needs.release-please.outputs.released }} - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Set up .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.0.x - - - name: Restore Dependencies - run: dotnet restore - - - name: Download Dalamud - run: | - Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip - Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev" - - - name: Build Plugin - run: | - invoke-expression 'dotnet build --no-restore --configuration Release ActionTimelineEx' - - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - path: .\ActionTimelineEx\bin\Release\net8.0-windows\ActionTimelineEx\ - - release: - name: release - needs: [release-please, build] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Download Build Artifact - uses: actions/download-artifact@v3 - - - name: Upload Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.release-please.outputs.upload_url }} - asset_path: artifact/latest.zip - asset_name: latest.zip - asset_content_type: application/zip - - - name: Trigger Repo Update - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ secrets.PAT }} - repository: ${{ github.repository_owner }}/DalamudPlugins - event-type: new-release