v0.1.2 #4
Workflow file for this run
This file contains hidden or 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
name: release-pipeline | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
release-job: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install release tooling | |
run: | | |
pip install twine wheel numpy setuptools versioneer | |
- name: Build package | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Check version number match | |
run: | | |
echo "GITHUB_REF: ${GITHUB_REF}" | |
# The GITHUB_REF should be something like "refs/tags/v1.2.3" | |
# Make sure the package version is the same as the tag | |
grep -Rq "^Version: ${GITHUB_REF:11}$" edgar_connect.egg-info/PKG-INFO | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: bdist | |
path: dist/* | |
pypi-publish: | |
needs: release-job | |
name: upload release to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: bdist | |
path: dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
test-install-job: | |
needs: pypi-publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Give PyPI a chance to update the index | |
run: sleep 360 | |
- name: Install from PyPI | |
run: | | |
pip install edgar_connect==${GITHUB_REF:11} |