From 2e01277d8f55c23caa43d457429309d1e3ce6567 Mon Sep 17 00:00:00 2001 From: "Simon (Darkside) Jackson" Date: Tue, 7 May 2024 16:12:27 +0100 Subject: [PATCH] Update workflows [skip ci] --- .github/workflows/development-publish.yml | 6 +----- .github/workflows/main-publish.yml | 14 ++++++-------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/development-publish.yml b/.github/workflows/development-publish.yml index ce5054c..62b81e2 100644 --- a/.github/workflows/development-publish.yml +++ b/.github/workflows/development-publish.yml @@ -1,12 +1,9 @@ name: Publish development branch on Merge on: - pull_request: - types: - - closed + push: branches: - development - # Ignore PRs targeting main # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -17,7 +14,6 @@ concurrency: jobs: release_on_merge: - if: github.event.pull_request.merged == true name: Tag and Publish UPM package uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2 with: diff --git a/.github/workflows/main-publish.yml b/.github/workflows/main-publish.yml index 5819ce7..b453997 100644 --- a/.github/workflows/main-publish.yml +++ b/.github/workflows/main-publish.yml @@ -1,19 +1,17 @@ name: Publish main branch and increment version on: - pull_request: - types: - - closed + push: branches: - main -# Allows you to run this workflow manually from the Actions tab + # Allows you to run this workflow manually from the Actions tab, last resort if GitHub does not behave workflow_dispatch: jobs: # Get Version to tag and release the branch, no up-version - [no-ver] included in PR title validate-environment: - if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver') + if: contains(github.event.head_commit.message, 'no-ver') name: Get Version from UPM package uses: realitycollective/reusableworkflows/.github/workflows/getpackageversionfrompackage.yml@v2 with: @@ -31,7 +29,7 @@ jobs: # Up version the release and publish major release upversion-major-Package: - if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver') == false && contains(github.event.pull_request.title, 'major-release') + if: contains(github.event.head_commit.message, 'no-ver') == false && contains(github.event.head_commit.message, 'major-release') name: Major Version package and release uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2 with: @@ -41,7 +39,7 @@ jobs: # Up version the release and publish minor release upversion-minor-Package: - if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver') == false && contains(github.event.pull_request.title, 'minor-release') + if: contains(github.event.head_commit.message, 'no-ver') == false && contains(github.event.head_commit.message, 'minor-release') name: Minor Version package and release uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2 with: @@ -51,7 +49,7 @@ jobs: # Up version the release and publish patch release (default) upversion-patch-Package: - if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver') == false && contains(github.event.pull_request.title, 'minor-release') == false && contains(github.event.pull_request.title, 'major-release') == false + if: contains(github.event.head_commit.message, 'no-ver') == false && contains(github.event.head_commit.message, 'minor-release') == false && contains(github.event.head_commit.message, 'major-release') == false name: Patch Version package and release uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2 with: