Set workflow status to skipped if same version published (#2539)

* Made a step that cancels a workflow, settings it's status to 'skipped'

* Fixed accidentally removed files

* Fix: returned deleted submodules
This commit is contained in:
Gusev Yaroslav 2023-11-17 00:34:02 +07:00 committed by GitHub
parent 5e8fe06dd6
commit 531ab06f63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,11 +36,10 @@ jobs:
# Stop workflow if version was not changed
- name: Stop workflow if version was not changed
uses: actions/github-script@v3
uses: styfle/cancel-workflow-action@0.12.0
if: steps.packageOld.outputs.version == steps.packageNew.outputs.version
with:
script: |
core.setFailed('No version changes. ${{ steps.packageOld.outputs.version }}')
workflow_id: ${{ github.run_id }}
# Create a new draft release
release-draft:
@ -118,4 +117,4 @@ jobs:
webhook: ${{ secrets.CODEX_BOT_WEBHOOK_FRONTEND }}
message: '🦥 [Draft release v${{ steps.package.outputs.version }}](${{ steps.create_release.outputs.html_url }}) for package [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) has been created. Add changelog and publish it!'
parse_mode: 'markdown'
disable_web_page_preview: true
disable_web_page_preview: true