diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 000000000..facf1bc57 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,58 @@ +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: Publish Plugin + uses: softprops/action-gh-release@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: RotationSolverReborn ${{ env.tag }} + tag: ${{ env.tag }} + 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