Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
Revises to wait for newly released version to appear in PyPI
index before attempting to install.
  • Loading branch information
maread99 committed Oct 3, 2022
1 parent f6c6bc8 commit 797512a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
# Verify can install from Test PyPI and import package
- name: Install from testpypi and import
run: |
echo "Will wait 10s" && sleep 10s
while [ "${{ github.ref_name }}" != $(pip index versions -i https://test.pypi.org/simple --pre market_prices | cut -d'(' -f2 | cut -d')' -f1 | sed 1q) ];\
do echo waiting for package to appear in test index, sleeping 5s; sleep 5s; done
pip install --index-url https://test.pypi.org/simple market_prices==${{ github.ref_name }} --no-deps
pip install -r requirements.txt
python -c 'import market_prices;print(market_prices.__version__)'
Expand All @@ -57,6 +58,7 @@ jobs:
# Verify can install from PyPI and import package
- name: Install and test running
run: |
echo "Will wait 10s" && sleep 10s
while [ "${{ github.ref_name }}" != $(pip index versions -i https://pypi.org/simple --pre market_prices | cut -d'(' -f2 | cut -d')' -f1 | sed 1q) ];\
do echo waiting for package to appear in index, sleeping 5s; sleep 5s; done
pip install --index-url https://pypi.org/simple market_prices==${{ github.ref_name }}
python -c 'import market_prices;print(market_prices.__version__)'
4 changes: 2 additions & 2 deletions docs/developers/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools-scm is used to version releases during the build process.

NB Prior to release 0.9.4 the tag was prefixed with a 'v'. The 'v' was dropped in 0.9.4 for facilitate the release workflow testing the installation of the new release.
NB Prior to release 0.9.4 the tag was prefixed with a 'v'.

## Draft release notes
Draft release notes for the next release should have been prepared by the [`draft-release-notes.yml` workflow](https://github.com/maread99/market_prices/blob/master/.github/workflows/draft-release-notes.yml). This uses the [Release Drafter action](https://github.com/marketplace/actions/release-drafter).
Expand All @@ -24,7 +24,7 @@ At the GitHub [releases page](https://github.com/maread99/market_prices/releases
* The draft release notes should already be at the top of the page. Click the pen icon to edit the draft.
* Tag the release. The draft will have suggested a tag for the release. If this tag doesn't reflect the intended version then either select the last commit's tag (if it was added) or create a new tag that reflects the version string (any new tag will be attached to last commit).
* Make sure target is selected as 'refs/head/master'.
* Name the release as the tag plus a 'v' prefix (e.g. "v0.9.4").
* Name the release as the tag (e.g. "0.9.4").
* Revise the draft release notes as requried.
* If the release includes new features, select the checkbox for 'Create a discussion for this release' (otherwise leave unchecked).
* Click the 'Publish Release' button.

0 comments on commit 797512a

Please sign in to comment.