Skip to content

Commit

Permalink
chore: run publish workflow from set branch
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetomir committed Oct 7, 2021
1 parent 971c2fc commit a995f24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/ff-master.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash

set -o verbose
BRANCH=$(git rev-parse --abbrev-ref HEAD)
set -o errexit

if [ "$BRANCH" != "master" ]; then
echo "Refusing to release from $BRANCH. This script should be running in master."
exit 1
fi
git checkout master

echo Fast-forwarding master to develop
set -o errexit
git fetch --quiet
git reset --hard origin/master
echo "Fast-forwarding master to develop"
git merge --ff-only --quiet origin/develop
set +o errexit

echo Pushing master
echo "Pushing master"
git push origin master

1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- name: Check out master
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0 # Fetch all branches
token: ${{ secrets.GH_TOKEN }}

Expand Down

0 comments on commit a995f24

Please sign in to comment.