Package : Add info if the CI needed to make a commit and push it

PR Main : Add workflow call input data
This commit is contained in:
Aurelien Vaillant
2022-01-26 10:50:28 +01:00
parent d133e01de0
commit c2f7995d72
2 changed files with 18 additions and 4 deletions
+17 -4
View File
@@ -14,6 +14,11 @@ on:
type: string type: string
required: true required: true
default: 'v0.0.0' default: 'v0.0.0'
draft_version:
description: 'Info about the release, publish or a draft'
type: string
required: true
default: "false"
env: env:
APP_NAME: 'moderlab_type' APP_NAME: 'moderlab_type'
@@ -29,11 +34,19 @@ jobs:
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@main
# Update the bl info version # Update the bl info version, update the init file and push if needed
- name: Change version number in the bl info addon data - name: Change version number in the bl info addon data
run: | run: python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ env.APP_NAME }}
echo set this tag "${{ steps.release.outputs.tag_name }}"
python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ env.APP_NAME }} - name: Commit the previous update
uses: actions-js/push@v1.3
if: ${{ inputs.draft_version }}
with:
github_token: ${{secrets.GITHUB_TOKEN}}
author_name: Moderlab
author_email: a.vaillant.moderlab@gmail.com
message: '[Bot] Bump to ${{ inputs.num_version }} version.'
force: true
# Make an archive with the plugin source only # Make an archive with the plugin source only
- name: Create zip archive release - name: Create zip archive release
@@ -63,6 +63,7 @@ jobs:
with: with:
num_version: ${{ needs.init-release-data.outputs.version_number }} num_version: ${{ needs.init-release-data.outputs.version_number }}
name_version: ${{ needs.init-release-data.outputs.version_name }} name_version: ${{ needs.init-release-data.outputs.version_name }}
draft_version: ${{ needs.init-release-data.outputs.version_draft }}
publish-release: publish-release:
name: Publish the Github Release name: Publish the Github Release