Skip to content

Commit

Permalink
Set workflow status to skipped if same version published (#2539)
Browse files Browse the repository at this point in the history
* Made a step that cancels a workflow, settings it's status to 'skipped'

* Fixed accidentally removed files

* Fix: returned deleted submodules
  • Loading branch information
GoldenJaden committed Nov 16, 2023
1 parent 5e8fe06 commit 531ab06
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/create-a-release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit 531ab06

Please sign in to comment.