diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index fc8b985..4189cfe 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -14,6 +14,11 @@ on: type: string required: true default: 'v0.0.0' + draft_version: + description: 'Info about the release, publish or a draft' + type: string + required: true + default: "false" env: APP_NAME: 'moderlab_type' @@ -29,11 +34,19 @@ jobs: steps: - 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 - run: | - echo set this tag "${{ steps.release.outputs.tag_name }}" - python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ env.APP_NAME }} + run: 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 - name: Create zip archive release diff --git a/.github/workflows/pull_request_main.yml b/.github/workflows/pr_main.yml similarity index 97% rename from .github/workflows/pull_request_main.yml rename to .github/workflows/pr_main.yml index 707c64b..c0a12ff 100644 --- a/.github/workflows/pull_request_main.yml +++ b/.github/workflows/pr_main.yml @@ -63,6 +63,7 @@ jobs: with: num_version: ${{ needs.init-release-data.outputs.version_number }} name_version: ${{ needs.init-release-data.outputs.version_name }} + draft_version: ${{ needs.init-release-data.outputs.version_draft }} publish-release: name: Publish the Github Release