Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: remove merge back from release workflow #102

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/release_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ concurrency:
group: release

jobs:
TestMainline:
name: Test Mainline
UnitTests:
name: Unit Tests
uses: ./.github/workflows/code_quality.yml
with:
branch: mainline
secrets: inherit

Bump:
needs: TestMainline
needs: Unit Tests
runs-on: ubuntu-latest
environment: release
permissions:
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: release
ref: mainline
fetch-depth: 0
token: ${{ secrets.CI_TOKEN }}

Expand All @@ -49,11 +49,6 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "client-software-ci"

- name: MergePushRelease
run: |
git merge --ff-only origin/mainline -v
git push origin release

- name: Bump
run: |
BUMP_ARGS=""
Expand Down Expand Up @@ -93,4 +88,4 @@ jobs:
git push -u origin bump/$NEXT_SEMVER

# Needs "Allow GitHub Actions to create and approve pull requests" under Settings > Actions
gh pr create --base release --title "chore(release): $NEXT_SEMVER" --body "$RELEASE_NOTES"
gh pr create --base mainline --title "chore(release): $NEXT_SEMVER" --body "$RELEASE_NOTES"
43 changes: 11 additions & 32 deletions .github/workflows/release_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,23 @@ jobs:
with:
ref: release
fetch-depth: 0

- name: VerifyReleaseBranch
run: |
RELEASE_HEAD=$(git show -s --format='%H')
if [[ $RELEASE_HEAD != ${{ github.sha }} ]]; then
echo "ERROR: tip of release branch ($RELEASE_HEAD) does not match the commit that started this release (${{ github.sha }}). Aborting release."
exit 1
else
echo "Verified tip of release branch ($RELEASE_HEAD) matches the commit that started this release (${{ github.sha }})"
fi
token: ${{ secrets.CI_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: ConfigureGit
run: |
git config --local user.email "[email protected]"
git config --local user.name "client-software-ci"

- name: MergePushRelease
run: |
git merge --ff-only origin/mainline -v
git push origin release

- name: PrepRelease
id: prep-release
run: |
Expand All @@ -77,9 +78,6 @@ jobs:
# The format of the tag must match the pattern in pyproject.toml -> tool.semantic_release.tag_format
TAG="$NEXT_SEMVER"

git config --local user.email "[email protected]"
git config --local user.name "client-software-ci"

git tag -a $TAG -m "Release $TAG"

echo "TAG=$TAG" >> $GITHUB_ENV
Expand Down Expand Up @@ -135,25 +133,6 @@ jobs:
git push origin $TAG
gh release create $TAG dist/* --notes "$RELEASE_NOTES"

MergeBack:
needs: Release
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: mainline
fetch-depth: 0
token: ${{ secrets.CI_TOKEN }}

- name: MergeBackMainline
run: |
git merge --ff-only origin/release
git push origin mainline

PublishToRepository:
needs: Release
runs-on: ubuntu-latest
Expand Down