From 0a94b809ff977e9fd0e5bffd70e36cdfa66dfa9e Mon Sep 17 00:00:00 2001 From: "Simon (Darkside) Jackson" Date: Tue, 7 May 2024 15:55:11 +0100 Subject: [PATCH] Update workflows [skip ci] --- .github/workflows/development-publish.yml | 6 +----- .github/workflows/main-publish.yml | 15 ++++++++------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/development-publish.yml b/.github/workflows/development-publish.yml index 786fd4e..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 targetting 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 70a6068..b453997 100644 --- a/.github/workflows/main-publish.yml +++ b/.github/workflows/main-publish.yml @@ -1,16 +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, 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: @@ -28,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: @@ -38,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: @@ -48,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: