This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI/CD] Store version number in alpa._version__ (#626)
- Loading branch information
1 parent
504e770
commit 5afa57b
Showing
9 changed files
with
238 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,34 +61,3 @@ jobs: | |
echo "Publish to PyPI" | ||
ls -ltr dist/ | ||
python -m twine upload --verbose dist/* | ||
update-version: | ||
runs-on: [ubuntu-latest] | ||
needs: [release-alpa] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Bump VERSION and commit | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git checkout -b actions/version-bump | ||
cat VERSION | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}' > VERSION.tmp && mv VERSION.tmp VERSION | ||
git add VERSION | ||
git commit -m "Bump candidate version [skip ci]" | ||
- name: Push branch | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.PAT_TOKEN }} | ||
branch: actions/version-bump | ||
force: true | ||
|
||
- name: Create version-bump PR | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
github_token: ${{ secrets.PAT_TOKEN }} | ||
source_branch: "actions/version-bump" | ||
destination_branch: "main" | ||
pr_title: "Bumping VERSION file due to recent release" | ||
pr_body: "*Automated PR*: This should update the candidate version. Please delete source branch upon merge" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""Version information.""" | ||
|
||
__version__ = "1.0.0.dev0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.