Split start and other event with the github action
This commit is contained in:
@@ -26,17 +26,6 @@ jobs:
|
|||||||
version_draft: ${{ steps.semantic_setup.outputs.draft }}
|
version_draft: ${{ steps.semantic_setup.outputs.draft }}
|
||||||
version_name: ${{ steps.semantic_setup.outputs.version }}
|
version_name: ${{ steps.semantic_setup.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Setup bump release
|
|
||||||
id: bump_setup
|
|
||||||
run: |
|
|
||||||
if [ ${{ contains(github.event.pull_request.labels.*.name, 'release:major') }} == true ]; then
|
|
||||||
echo "::set-output name=type::major"
|
|
||||||
elif [ ${{ contains(github.event.pull_request.labels.*.name, 'release:minor') }} == true ]; then
|
|
||||||
echo "::set-output name=type::minor"
|
|
||||||
else
|
|
||||||
echo "::set-output name=type::patch"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Get the Semantic tag Version
|
- name: Get the Semantic tag Version
|
||||||
id: get_semantic_setup
|
id: get_semantic_setup
|
||||||
uses: oprypin/find-latest-tag@v1.1.0
|
uses: oprypin/find-latest-tag@v1.1.0
|
||||||
@@ -46,15 +35,6 @@ jobs:
|
|||||||
prefix: 'v'
|
prefix: 'v'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Increment if a new release are needed to generated
|
|
||||||
if: ${{ github.event.action == 'opened' }}
|
|
||||||
id: new_semantic_setup
|
|
||||||
uses: zwaldowski/semver-release-action@v2
|
|
||||||
with:
|
|
||||||
bump: ${{ steps.bump_setup.outputs.type }}
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
dry_run: true
|
|
||||||
|
|
||||||
- name: From all use case, get the Tag version
|
- name: From all use case, get the Tag version
|
||||||
id: semantic_setup
|
id: semantic_setup
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
[main]
|
[main]
|
||||||
types:
|
types:
|
||||||
[opened, edited, synchronize, closed]
|
[edited, synchronize, closed]
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
name: Create addon release
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
[main]
|
||||||
|
types:
|
||||||
|
[opened]
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
init-release:
|
||||||
|
name: Generate the release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Setup bump release
|
||||||
|
id: bump_setup
|
||||||
|
run: |
|
||||||
|
if [ ${{ contains(github.event.pull_request.labels.*.name, 'release:major') }} == true ]; then
|
||||||
|
echo "::set-output name=type::major"
|
||||||
|
elif [ ${{ contains(github.event.pull_request.labels.*.name, 'release:minor') }} == true ]; then
|
||||||
|
echo "::set-output name=type::minor"
|
||||||
|
else
|
||||||
|
echo "::set-output name=type::patch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Increment a new release
|
||||||
|
id: new_semantic_setup
|
||||||
|
uses: zwaldowski/semver-release-action@v2
|
||||||
|
with:
|
||||||
|
bump: ${{ steps.bump_setup.outputs.type }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
dry_run: true
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
uses: Moderlab-Production/BlenderTemplate/.github/workflows/unit_test.yml@main
|
||||||
Reference in New Issue
Block a user