Skip to content

Commit

Permalink
fix: remove commit branch check for now
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Mar 16, 2024
1 parent c0a0a67 commit 54e20db
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ jobs:
echo "version=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
# Just in case we accidentally release something not on main.
commit-branch-check:
name: "Check commit branch"
runs-on: "ubuntu-latest"
needs:
- "crate-info"

steps:
- name: "Checkout source code"
uses: "actions/checkout@v3"
with:
fetch-depth: 0

- name: "Check if commit is on main"
run: |
COMMIT_HASH=$(git log -1 --format=%H ${{ github.ref }})
GREP_OUTPUT=$(git log origin/main --format=%H | grep "$COMMIT_HASH")
if [ -z "$GREP_OUTPUT" ]; then
echo "Cannot release commits not on the main branch"
exit 1
fi
# commit-branch-check:
# name: "Check commit branch"
# runs-on: "ubuntu-latest"
# needs:
# - "crate-info"

# steps:
# - name: "Checkout source code"
# uses: "actions/checkout@v3"
# with:
# fetch-depth: 0

# - name: "Check if commit is on main"
# run: |
# COMMIT_HASH=$(git log -1 --format=%H ${{ github.ref }})
# GREP_OUTPUT=$(git log origin/main --format=%H | grep "$COMMIT_HASH")

# if [ -z "$GREP_OUTPUT" ]; then
# echo "Cannot release commits not on the main branch"
# exit 1
# fi

crate-version-check:
name: "Check crate version"
Expand All @@ -69,7 +69,6 @@ jobs:
runs-on: "ubuntu-latest"
needs:
- "crate-info"
- "commit-branch-check"
- "crate-version-check"
outputs:
release-id: ${{ steps.create.outputs.id }}
Expand All @@ -90,7 +89,6 @@ jobs:
needs:
- "crate-info"
- "draft-release"
- "commit-branch-check"
- "crate-version-check"

strategy:
Expand Down Expand Up @@ -173,7 +171,6 @@ jobs:
needs:
- "crate-info"
- "draft-release"
- "commit-branch-check"
- "crate-version-check"

strategy:
Expand Down

0 comments on commit 54e20db

Please sign in to comment.