Skip to content

Commit

Permalink
build: move condition check to upper if block (#30)
Browse files Browse the repository at this point in the history
* build: remove branch-ignore

* build: use tag to check if trigger flow

* build: move condition check to upper if

Co-authored-by: justin <>
  • Loading branch information
JustinlinPerp authored Mar 15, 2022
1 parent b8ea713 commit f5e644a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dev1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- op-kovan-dev1
jobs:
publish-npm-package:
if: github.base_ref != 'main' && github.event_name != 'pull_request'
if: ${{contains(github.event.release.tag_name, 'multicollateral' )}}
runs-on: ubuntu-latest
outputs:
pkg_version: ${{ steps.set-variables.outputs.pkg_version }}
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

discord-notification-npm-package:
name: Discord Notification for publishing npm package
if: always()
if: always() && contains(github.event.release.tag_name, 'multicollateral')
needs: [publish-npm-package]
runs-on: ubuntu-latest
steps:
Expand All @@ -73,7 +73,7 @@ jobs:
args: "**[@perp/v2-sdk: dev1]** @perp/v2-sdk version: **${{ needs.publish-npm-package.outputs.pkg_version }}** published successfully ✅"

- name: issue failure notificaiton
if: needs.publish-npm-package.result != 'success' && github.base_ref != 'main' && github.event_name != 'pull_request'
if: needs.publish-npm-package.result != 'success'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
uses: Ilshidur/action-discord@master
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/dev2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
push:
branches:
- op-kovan-dev2
pull_request:
branches-ignore:
- main
jobs:
publish-npm-package:
if: github.base_ref != 'main' && github.event_name != 'pull_request'
Expand Down

0 comments on commit f5e644a

Please sign in to comment.