Add the CI github workflow

This commit is contained in:
2022-01-25 15:13:37 +01:00
parent 435d013d58
commit d133e01de0
6 changed files with 310 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
name: Package Blender Plugin
# How to start the Github Action
on:
workflow_call:
inputs:
num_version:
description: 'Get the desired number version'
type: string
required: true
default: '0.0.0'
name_version:
description: 'The release name used'
type: string
required: true
default: 'v0.0.0'
env:
APP_NAME: 'moderlab_type'
NAME_PACKAGE: 'moderlab_type.zip'
PATH_RELEASE: ${{ github.workspace }}\releases
# Execute this command
jobs:
make-archive:
name: Make Addon Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
# Update the bl info version
- name: Change version number in the bl info addon data
run: |
echo set this tag "${{ steps.release.outputs.tag_name }}"
python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ env.APP_NAME }}
# Make an archive with the plugin source only
- name: Create zip archive release
run: |
cd '${{ github.workspace }}/${{ env.APP_NAME }}'
zip -r '${{ github.workspace }}/releases/${{ env.NAME_PACKAGE }}' *
- uses: actions/upload-artifact@v2
with:
name: ${{ env.NAME_PACKAGE }}
path: ${{ github.workspace }}/releases/${{ env.NAME_PACKAGE }}
- name: Update the github release
if: github.event_name == 'pull_request'
uses: johnwbyrd/update-release@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: '${{ github.workspace }}/releases/${{ env.NAME_PACKAGE }}'
release: ${{ inputs.name_version }}
tag: ${{ inputs.name_version }}