Skip to content

Commit

Permalink
Mark stable tags from default branch as latest (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
rustydb authored Nov 12, 2024
2 parents 61270be + a39d408 commit 28d2b1a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/promote-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
workflow_dispatch:
env:
STREAM: stable
LATEST: false
jobs:
Promote:
runs-on: ubuntu-latest
Expand All @@ -24,13 +25,26 @@ jobs:
with:
STREAM: ${{ env.STREAM }}

- name: Get Branch
run: |
mapfile -t branches < <(git branch -r --contains ${{ github.ref }} | awk '{print $1}')
echo "${branches[@]}"
for branch in "${branches[@]}"; do
branch_name="${branch/origin\/}"
echo "${branch_name}"
if [ "${branch_name}" = 'main' ]; then
echo LATEST=true >> $GITHUB_ENV
break
fi
done
- uses: ncipollo/release-action@v1
with:
allowUpdates: true # if the job is re-ran to catch missed artifacts, allow updates
generateReleaseNotes: true
artifacts: ${{ env.DIR_UPLOAD }}/*
prerelease: false
makeLatest: true
makeLatest: ${{ fromJSON(env.LATEST) }}

generate_publish_docs:
name: generate docs with nox/sphinx and publish with mike
Expand Down

0 comments on commit 28d2b1a

Please sign in to comment.