From a16e07773938a7ff21f060aa7600ba470d3d8a3c Mon Sep 17 00:00:00 2001 From: BrakusTapus <38063721+BrakusTapus@users.noreply.github.com> Date: Thu, 14 Dec 2023 05:08:01 +0100 Subject: [PATCH] edit --- .github/workflows/Build_and_Release.yml | 161 +++++++++++++++++++++++ .gitignore | 2 + ActionTimelineEx/ActionTimelineEx.csproj | 92 ++++++------- ActionTimelineEx/ActionTimelineEx.yaml | 12 +- README.md | 13 +- 5 files changed, 223 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/Build_and_Release.yml diff --git a/.github/workflows/Build_and_Release.yml b/.github/workflows/Build_and_Release.yml new file mode 100644 index 0000000..4ac8881 --- /dev/null +++ b/.github/workflows/Build_and_Release.yml @@ -0,0 +1,161 @@ +name: Build and Release + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + # Checks if commit contains word NEW or if manual dispatch + Check_Commit: + runs-on: windows-latest + steps: + - name: Check Commit Message + run: | + $eventName = '${{ github.event_name }}' + if ($eventName -eq 'workflow_dispatch') { + echo "Manual dispatch detected. Setting RUN_WORKFLOW to true." + echo "commit_contains_new=true" >> $GITHUB_ENV + } else { + $commitMessage = (Get-Content $env:GITHUB_EVENT_PATH | ConvertFrom-Json).head_commit.message + if ($commitMessage -like "*NEW*") { + echo "Commit message contains 'NEW'." + echo "commit_contains_new=true" >> $GITHUB_ENV + } else { + echo "Commit message does not contain 'NEW'." + echo "commit_contains_new=false" >> $GITHUB_ENV + } + } + shell: pwsh + + # Extracts version number + Check_Version: + needs: Check_Commit + if: ${{ github.event_name == 'workflow_dispatch' || needs.Check_Commit.outputs.commit_contains_new == 'true' }} + runs-on: windows-latest + outputs: + current_version: ${{ steps.extract_versions.outputs.current_version }} + steps: + # Checkout repository + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + # Remove this after workflow is working + - name: List Directory Contents + run: | + Get-ChildItem -Recurse + shell: pwsh + + # extract the version number from '.csproj' + - name: Extract version numbers + id: extract_versions # Add an id to this step to reference its outputs + working-directory: D:\a\ActionTimelineEx\ActionTimelineEx + run: | + $csprojPath = "./ActionTimelineEx.csproj" + $csprojXml = [xml](Get-Content $csprojPath) + $version = $csprojXml.Project.PropertyGroup.Version + echo "Project Version: $version" + echo "::set-output name=current_version::$version" + # build and release if the version number has been updated + build: + needs: Check_Version + runs-on: windows-latest + outputs: + current_version: ${{ steps.extract_versions.outputs.project_version }} + steps: + # Checkout repository + - name: Checkout Code + uses: actions/checkout@v3 + with: + submodules: recursive + + # Remove this after workflow is working + - name: List Directory Contents + run: | + Get-ChildItem -Recurse + shell: pwsh + + # extract the version number from '.csproj' + - name: Extract version numbers + working-directory: D:\a\ActionTimelineEx\ActionTimelineEx + run: | + $ActionTimelineExPath = "./ActionTimelineEx.csproj" + + $ActionTimelineExXml = [xml](Get-Content $ActionTimelineExPath) + + $ActionTimelineExVersion = $ActionTimelineExsXml.Project.PropertyGroup.Version + + echo "Project 1 Version: $ActionTimelineExVersion" + + # dunno if needed + - name: Check Version Against Latest Release + id: check_version + run: | + $latestReleaseTag = $(curl --silent "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r .tag_name) + $versionActionTimelineEx = "${{ steps.get_version.outputs.version_ActionTimelineEx }}" + if ($latestReleaseTag -eq $versionActionTimelineEx) { + echo "::set-output name=cancel::true" + } else { + echo "::set-output name=cancel::false" + } + shell: pwsh + + # Sets up .NET + - name: Set up .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + + # Restore Dependencies + - name: Restore Dependencies + run: dotnet restore + + # Download and extract Dalamud + - 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" + + # Builds ActionTimelineEx + - name: Build ActionTimelineEx + run: | + invoke-expression 'dotnet build --no-restore --configuration Release ActionTimelineEx' + + # list directory contents + - name: List Directory Contents + run: | + Get-ChildItem -Recurse + shell: pwsh + + # create release + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ needs.Check_Version.outputs.current_version }} + release_name: Release v${{ needs.Check_Version.outputs.current_version }} + draft: false + prerelease: false + + # list directory contents + - name: List Directory Contents + run: | + Get-ChildItem -Recurse + shell: pwsh + + # Upload Assets + + + # clean up on failure + - name: Cleanup on failure + if: failure() + run: | + gh release delete v${{ needs.Check_Version.outputs.current_version }} --yes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash \ No newline at end of file diff --git a/.gitignore b/.gitignore index cbd5a09..8bfa86c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +FUNDING.yml + # Packaging pack/ diff --git a/ActionTimelineEx/ActionTimelineEx.csproj b/ActionTimelineEx/ActionTimelineEx.csproj index fb0ef48..e8cf585 100644 --- a/ActionTimelineEx/ActionTimelineEx.csproj +++ b/ActionTimelineEx/ActionTimelineEx.csproj @@ -1,48 +1,52 @@  - - net7.0-windows - enable - Kirbo - x64 - AnyCPU - 1.3.6 - enable - $(AppData)\XIVLauncher\addon\Hooks\dev\ - true - true - + + net7.0-windows + enable + Kirbo + x64 + AnyCPU + 1.3.6 + enable + $(AppData)\XIVLauncher\addon\Hooks\dev\ + true + true + - - - + + + + + + + - - $(DalamudLibPath)Dalamud.dll - False - - - $(DalamudLibPath)ImGui.NET.dll - False - - - $(DalamudLibPath)ImGuiScene.dll - False - - - $(DalamudLibPath)Lumina.dll - False - - - $(DalamudLibPath)Lumina.Excel.dll - False - - - $(DalamudLibPath)FFXIVClientStructs.dll - False - - - $(DalamudLibPath)Newtonsoft.Json.dll - False - - + + $(DalamudLibPath)Dalamud.dll + False + + + $(DalamudLibPath)ImGui.NET.dll + False + + + $(DalamudLibPath)ImGuiScene.dll + False + + + $(DalamudLibPath)Lumina.dll + False + + + $(DalamudLibPath)Lumina.Excel.dll + False + + + $(DalamudLibPath)FFXIVClientStructs.dll + False + + + $(DalamudLibPath)Newtonsoft.Json.dll + False + + diff --git a/ActionTimelineEx/ActionTimelineEx.yaml b/ActionTimelineEx/ActionTimelineEx.yaml index c06ec68..ce30973 100644 --- a/ActionTimelineEx/ActionTimelineEx.yaml +++ b/ActionTimelineEx/ActionTimelineEx.yaml @@ -1,10 +1,10 @@  name: ActionTimelineEx -author: Tischel, ArchiTed +author: Tischel, ArchiTed, Kirbo description: |- Configurable timeline display of all the actions you use. punchline: Show your actions in real-time. -repo_url: https://github.com/ArchiDog1998/ActionTimelineEx +repo_url: https://github.com/BrakusTapus/ActionTimelineEx icon_url: https://xivapi.com/i/000000/000073_hr1.png dalamud_api_level: 9 tags: @@ -12,7 +12,7 @@ tags: category_tags: - UI image_urls: - - https://raw.githubusercontent.com/ArchiDog1998/ActionTimelineEx/main/Images/example.gif -download_link_install: https://github.com/ArchiDog1998/ActionTimelineEx/releases/latest/download/latest.zip -download_link_update: https://github.com/ArchiDog1998/ActionTimelineEx/releases/latest/download/latest.zip -download_link_testing: https://github.com/ArchiDog1998/ActionTimelineEx/releases/latest/download/latest.zip \ No newline at end of file + - https://raw.githubusercontent.com/BrakusTapus/ActionTimelineEx/main/Images/example.gif +download_link_install: https://github.com/BrakusTapus/ActionTimelineEx/releases/latest/download/latest.zip +download_link_update: https://github.com/BrakusTapus/ActionTimelineEx/releases/latest/download/latest.zip +download_link_testing: https://github.com/BrakusTapus/ActionTimelineEx/releases/latest/download/latest.zip \ No newline at end of file diff --git a/README.md b/README.md index a36211e..96c0c11 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,18 @@ # Action Timeline Plugin -![Github Latest Releases](https://img.shields.io/github/downloads/ArchiDog1998/ActionTimelineEx/latest/total.svg?style=for-the-badge) -![Github All Releases](https://img.shields.io/github/downloads/ArchiDog1998/ActionTimelineEx/total.svg?style=for-the-badge) -![Github Lines](https://img.shields.io/tokei/lines/github/ArchiDog1998/ActionTimelineEx?style=for-the-badge) -![Github License](https://img.shields.io/github/license/ArchiDog1998/ActionTimelineEx.svg?label=License&style=for-the-badge) -![Github Commits](https://img.shields.io/github/commits-since/ArchiDog1998/ActionTimelineEx/latest/main?style=for-the-badge) +![Github Latest Releases](https://img.shields.io/github/downloads/BrakusTapus/ActionTimelineEx/latest/total.svg?style=for-the-badge) +![Github All Releases](https://img.shields.io/github/downloads/BrakusTapus/ActionTimelineEx/total.svg?style=for-the-badge) +![Github License](https://img.shields.io/github/license/BrakusTapus/ActionTimelineEx.svg?label=License&style=for-the-badge) +![Github Commits](https://img.shields.io/github/commits-since/BrakusTapus/ActionTimelineEx/latest/main?style=for-the-badge) -A Final Fantasy XIV Dalamud Plugin that shows a timeline with the actions you use in real-time. It was forked from [Tischel](https://github.com/Tischel/ActionTimeline). +A Final Fantasy XIV Dalamud Plugin that shows a timeline with the actions you use in real-time. It was forked from [ArchiDog1998](https://github.com/ArchiDog1998/ActionTimeline). ![example](/Images/example.gif) Download it at this url: ``` -https://raw.githubusercontent.com/ArchiDog1998/Dalamud_Plugins/main/pluginmaster.json +https://raw.githubusercontent.com/BrakusTapus/PluginHUB/main/pluginmaster.json ``` ## Disclaimer