Files
2024-05-04 16:18:49 +02:00

47 lines
1.3 KiB
YAML

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
- uses: actions/checkout@main
- name: Create new Semantic Version
uses: zwaldowski/semver-release-action@v2
id: new_semantic_setup
with:
bump: ${{ steps.bump_setup.outputs.type }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
prefix: v
- name: Make the github release
uses: ncipollo/release-action@v1.10.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
tag: ${{ steps.new_semantic_setup.outputs.version_tag }}
unit-test:
uses: Moderlab-Production/BlenderTemplate/.github/workflows/unit_test.yml@main