Skip to content

Commit

Permalink
Build releases directly from tags instead of release branches (stream…
Browse files Browse the repository at this point in the history
…lit#7580)

* Get rid of unused release candidate workflow

* Just build releases directly from tag instead of release branch

* Get rid of unused scripts

* Add back branch check to verify that corresponding PR exists
  • Loading branch information
vdonato authored Oct 22, 2023
1 parent 166ad3a commit f73d755
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 287 deletions.
118 changes: 0 additions & 118 deletions .github/workflows/release-candidate.yml

This file was deleted.

26 changes: 2 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,33 +90,22 @@ jobs:
run: |
pip install requests
echo "GH_PR_BRANCH=$(python scripts/get_release_branch.py)" >> $GITHUB_ENV
- name: Ensure that version tag matches branch version
- name: Ensure release branch corresponding to this tag exists
env:
GH_PR_BRANCH: ${{ env.GH_PR_BRANCH }}
run: |
BRANCH_VERSION=$(echo "$GH_PR_BRANCH" | sed 's/release\///' )
if [ "$BRANCH_VERSION" != "$GIT_TAG" ]
then
echo "ERROR: Version number from tag does not match the version number from the branch name."
echo "ERROR: release branch corresponding to this tag does not exist."
exit 1
fi
- name: Checkout head of branch
env:
GH_PR_BRANCH: ${{ env.GH_PR_BRANCH }}
run: |
git pull origin "$GH_PR_BRANCH" --ff-only
- name: Setup virtual env
uses: ./.github/actions/make_init
- name: Set release version from tag name
env:
GIT_TAG: ${{ env.GIT_TAG }}
run: echo "STREAMLIT_RELEASE_VERSION=$GIT_TAG" >> $GITHUB_ENV
- name: Update version
env:
STREAMLIT_RELEASE_VERSION: ${{ env.STREAMLIT_RELEASE_VERSION }}
run: |
python scripts/update_version.py "$STREAMLIT_RELEASE_VERSION"
- name: Create Package
timeout-minutes: 120
run: |
Expand All @@ -133,17 +122,6 @@ jobs:
TWINE_PASSWORD: ${{ secrets.STREAMLIT_PYPI_API_TOKEN }}
run: |
make distribute
- name: Commit version updates
env:
GH_PR_BRANCH: ${{ env.GH_PR_BRANCH }}
STREAMLIT_RELEASE_VERSION: ${{ env.STREAMLIT_RELEASE_VERSION }}
run: |
git config user.email "[email protected]"
git config user.name "Streamlit Bot"
git switch -c "$GH_PR_BRANCH"
git commit -am 'Up version to "$STREAMLIT_RELEASE_VERSION"' && git push origin "$GH_PR_BRANCH" || echo "No changes to commit"
- name: Create GitHub Release
env:
GIT_TAG: ${{ env.GIT_TAG }}
Expand Down
53 changes: 0 additions & 53 deletions scripts/get_latest_release_candidate.py

This file was deleted.

92 changes: 0 additions & 92 deletions scripts/get_prerelease_version.py

This file was deleted.

0 comments on commit f73d755

Please sign in to comment.