diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml index 039016f7..c7fdf6c4 100644 --- a/.github/workflows/build-plugin.yml +++ b/.github/workflows/build-plugin.yml @@ -7,10 +7,10 @@ on: push: branches: - '*' - tags-ignore: - - '*' + tags: + - "0.*.*.*" pull_request: - branches: [ EQDPSPlugin ] + branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -68,3 +68,25 @@ jobs: details: Test Cancelled! text: ACT EverQuest DPS Plugin .NET Framework Version ${{ matrix.dotnetFrameworkVersion }} webhookUrl: ${{ secrets.ACT_EQ_DISCORD_WEBHOOK }} + - name: Create Release + id: create_release + uses: actions/create-release@v1 + if: github.ref_type == 'tag' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + if: github.ref_type == 'tag' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: .\EverQuestDPSPlugin\obj\Release\EverQuestDPSPlugin.dll + asset_name: EverQuestDPSPlugin.dll + asset_content_type: application/dll diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index d91b4400..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,52 +0,0 @@ -on: - push: - # Sequence of patterns matched against refs/tags - tags: - - "0.*.*.*" - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -name: ACT EverQuest DPS Plugin Upload Release Asset -jobs: - build-and-create-release: - runs-on: windows-latest - env: - ACTFileName: 'ACTv3-setup.exe' - ACTDownloadURI: 'https://advancedcombattracker.com/download.php?id=56' - EQDPSPluginUnitTestLibraryPath: '.\EQDPSPluginUnitTests\bin\Release\EQDPSPluginUnitTests.dll' - steps: - - uses: actions/checkout@main - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.1 - - name: Download ACTv3 file - run: Invoke-WebRequest ${{env.ACTDownloadURI}} -OutFile ${{github.workspace}}\${{env.ACTFileName}} - - name: Silent Install of ACTv3 - run: ${{github.workspace}}\${{env.ACTFileName}} /S - - name: Setup Nuget - uses: nuget/setup-nuget@v1 - - name: Restore nuget packages - run: nuget restore EverQuestDPSPlugin.sln - - name: Build solution - run: msbuild -t:build -property:Configuration=Release EverQuestDPSPlugin.sln - - name: Test solution - run: '& "$(vswhere -property installationPath)\Common7\IDE\MSTest.exe" /testcontainer:${{env.EQDPSPluginUnitTestLibraryPath}}' - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: .\EverQuestDPSPlugin\obj\Release\EverQuestDPSPlugin.dll - asset_name: EverQuestDPSPlugin.dll - asset_content_type: application/dll