diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8c3fb1fd..20065f367 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,12 +135,6 @@ jobs: with: file_path: "pakku-lock.json" - - name: 🔍 Check if tag exists - uses: mukunku/tag-exists-action@v1.6.0 - id: check_tag - with: - tag: ${{ steps.pakku_info.outputs.version }} - - name: 📄 Changelog Dev Parser id: changelog_dev if: ${{ env.DEV_ENVIRONMENT == 'true' }} @@ -157,6 +151,12 @@ jobs: path: CHANGELOG.md continue-on-error: true + - name: 🔍 Check if tag exists + uses: mukunku/tag-exists-action@v1.6.0 + id: check_tag + with: + tag: ${{ steps.changelog.outputs.version }} + - name: 🔍 Check id: check shell: bash @@ -185,6 +185,26 @@ jobs: ```markdown ${{ steps.read_diff.outputs.diff }} ``` + + - name: 🔍 Create Pull Request if tag not found + id: create_pr + if: ${{ steps.check_tag.outputs.exists == 'false' && env.DEV_ENVIRONMENT == 'true' }} + uses: peter-evans/create-pull-request@v7.0.8 + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: 'Release: ${{ steps.check.outputs.project_version }}' + body: | + 'This is an automated Pull Request from the dev branch.' + 📃 **Name**: ${{ steps.check.outputs.project_name }} + 📃 **Release**: `${{ steps.check.outputs.project_version }}` + 📃 **Release Type**: `${{ steps.check.outputs.release_type }}` + 📃 **Game Version**: `${{ steps.check.outputs.minecraft_version }}` + + ${{ steps.changelog_dev.outputs.description }} + ${{ steps.format_diff.outputs.text }} + head: dev + base: main + team-reviewers: project-lead - name: 📝 Generate Github Summary uses: WcAServices/markdown-template-action@v1.1.1