Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
Updates release workflow to test release by explicitly installing
released version.
  • Loading branch information
maread99 committed Jul 5, 2022
1 parent bec8ca7 commit 10c7555
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TEST_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

# Verify can install from Test PyPI and import package
- name: Verify from Test PyPI
run: |
pip install --extra-index-url https://test.pypi.org/simple market_prices
echo "Will wait 10s" && sleep 10s
pip install --extra-index-url https://test.pypi.org/simple market_prices==${{ github.ref_name }}
python -c 'import market_prices;print(market_prices.__version__)'
pip uninstall -y market_prices
Expand All @@ -50,5 +51,6 @@ jobs:
# Verify can install from PyPI and import package
- name: Verify from PyPI
run: |
pip install market_prices
echo "Will wait 10s" && sleep 10s
pip install market_prices==${{ github.ref_name }}
python -c 'import market_prices;print(market_prices.__version__)'
1 change: 1 addition & 0 deletions docs/developers/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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 (e.g. "v0.9.2").
* 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 10c7555

Please sign in to comment.