Test to split the PR request ci with 2 files (more readable)

This commit is contained in:
Aurelien Vaillant
2022-01-31 18:19:16 +01:00
parent 6e2d7cd396
commit 1889303203
2 changed files with 39 additions and 56 deletions
+2 -42
View File
@@ -6,53 +6,13 @@ on:
branches:
[main]
types:
[edited, synchronize, closed]
[opened, edited, synchronize, closed]
jobs:
init-release-data:
name: Initialize all data about the package
runs-on: ubuntu-latest
outputs:
version_type: ${{ steps.bump_setup.outputs.type }}
version_number: ${{ steps.semantic_setup.outputs.version }}
version_draft: ${{ steps.semantic_setup.outputs.draft }}
version_name: v${{ steps.semantic_setup.outputs.version }}
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
# Config the release number
# - get tag with sync PR
# - publish the release if the PR is closed
- name: Get the Semantic tag Version
id: get_semantic_setup
uses: oprypin/find-latest-tag@v1.1.0
with:
repository: ${{ github.repository }}
releases-only: true
prefix: 'v'
token: ${{ secrets.GITHUB_TOKEN }}
- name: From all use case, get the Tag version
id: semantic_setup
run: |
tag=${{ steps.get_semantic_setup.outputs.tag }}
if [ "${{ github.event.action }}" == "closed" ]; then
echo "::set-output name=version::${tag:1}"
echo "::set-output name=draft::false"
else
echo "::set-output name=version::${tag:1}"
echo "::set-output name=draft::true"
fi
uses: Moderlab-Production/BlenderTemplate/.github/workflows/init_release.yml@main
unit-test:
uses: Moderlab-Production/BlenderTemplate/.github/workflows/unit_test.yml@main