From e28c544363d9c848f5abd0a6b01c043ef8816ffd Mon Sep 17 00:00:00 2001 From: NostraThomas99 <34015422+NostraThomas99@users.noreply.github.com> Date: Thu, 28 Mar 2024 00:09:55 -0500 Subject: [PATCH 1/2] Replace publish workflow --- .github/workflows/publish.yaml | 64 ++++++++++++++++++++++++++++ .github/workflows/release-please.yml | 16 ------- 2 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/publish.yaml delete mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 000000000..b721f3f79 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,64 @@ +name: Publish +on: + push: + tags: + - 'v*.*.*.*' +jobs: + Build: + runs-on: ubuntu-latest + env: + DALAMUD_HOME: ${{ github.workspace }}/Dalamud/ + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: true + + - name: Get Environment Variables + run: | + tag=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//') + echo "tag=$tag" >> $GITHUB_ENV + + if [[ "$tag" == *"-test" ]]; then + branch="testing" + tag=$(echo $tag | sed 's/-test//') + else + branch="latest" + fi + + echo "branch=$branch" >> $GITHUB_ENV + + - name: Set up .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.0.x + + - name: Download Dalamud Latest + run: | + wget https://goatcorp.github.io/dalamud-distrib/latest.zip -O ${{ env.DALAMUD_HOME }}.zip + unzip ${{ env.DALAMUD_HOME }}.zip -d ${{ env.DALAMUD_HOME }} + + - name: Restore Nuget Packages + run: dotnet restore RotationSolver/RotationSolver.csproj + + - name: Build Plugin + run: dotnet build --no-restore -c Release RotationSolver/RotationSolver.csproj -p:AssemblyVersion=${{ env.tag }} -p:FileVersion=${{ env.tag }} -p:InformationalVersion=${{ env.tag }} + + - name: Generate Changelog + run: | + git fetch --tags + git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-decorate --no-merges > changelog.txt + + - name: Publish Plugin + uses: softprops/action-gh-release@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: RotationSolverReborn ${{ env.tag }} + tag: ${{ env.tag }} + body_path: changelog.txt + draft: false + make_latest: ${{ env.branch == 'latest' }} + prerelease: ${{ env.branch == 'testing' }} + + + diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index a51188279..000000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,16 +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 - steps: - - id: rp - uses: google-github-actions/release-please-action@v3 - with: - release-type: node - package-name: release-please-action From 13d8c4fe8b730f913a1c2801645c323678e02259 Mon Sep 17 00:00:00 2001 From: NostraThomas99 <34015422+NostraThomas99@users.noreply.github.com> Date: Thu, 28 Mar 2024 00:15:54 -0500 Subject: [PATCH 2/2] Update publish.yaml --- .github/workflows/publish.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index b721f3f79..facf1bc57 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -44,18 +44,12 @@ jobs: - name: Build Plugin run: dotnet build --no-restore -c Release RotationSolver/RotationSolver.csproj -p:AssemblyVersion=${{ env.tag }} -p:FileVersion=${{ env.tag }} -p:InformationalVersion=${{ env.tag }} - - name: Generate Changelog - run: | - git fetch --tags - git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-decorate --no-merges > changelog.txt - - name: Publish Plugin uses: softprops/action-gh-release@v4 with: token: ${{ secrets.GITHUB_TOKEN }} name: RotationSolverReborn ${{ env.tag }} tag: ${{ env.tag }} - body_path: changelog.txt draft: false make_latest: ${{ env.branch == 'latest' }} prerelease: ${{ env.branch == 'testing' }}