Skip to content

Commit

Permalink
Add branch filter to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Jan 12, 2023
1 parent ff831e9 commit c345bca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Promote

on:
push:
branches:
- develop
branches: [develop]

jobs:
promote:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: Pull request

on:
pull_request:
branches:
- master
- develop
branches: [master, develop]

jobs:
test:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Push
on:
push:
branches:
- develop
branches: [develop]

env:
PROJECT: casimir
Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Release
on:
push:
branches: [master]
tags: [v*]

env:
Expand Down Expand Up @@ -44,20 +45,6 @@ jobs:
- name: Deploy cdk infrastructure
run: npm run deploy

- name: Sync released version files to develop
if: ${{ github.actor != 'nektos/act' }}
run: |
git config --global user.name 'robosupport'
git config --global user.email 'support@consensusnetworks.com'
git fetch
git checkout $TARGET_BRANCH
git checkout ${GITHUB_REF##*/} -- package.json package-lock.json CHANGELOG.md
git add -A
git diff-index --quiet HEAD || git commit -am "Sync released version files (skip deploy)"
git push origin $TARGET_BRANCH
env:
TARGET_BRANCH: develop

- name: Select success emoji
if: ${{ success() }}
run: echo 'EMOJI=:rocket:' >> $GITHUB_ENV
Expand Down

0 comments on commit c345bca

Please sign in to comment.