Skip to content

Commit

Permalink
Prepping for release: 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Nov 29, 2023
1 parent f7b77d8 commit ed94e52
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 27 deletions.
71 changes: 47 additions & 24 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
name: Publish to PyPI
name: Release

on:
workflow_dispatch:
release:
types: [released]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Publish release to PyPI
env:
PYPI_USERNAME_STSCI_MAINTAINER: ${{ secrets.PYPI_USERNAME_STSCI_MAINTAINER }}
PYPI_PASSWORD_STSCI_MAINTAINER: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
PYPI_USERNAME_OVERRIDE: ${{ secrets.PYPI_USERNAME_OVERRIDE }}
PYPI_PASSWORD_OVERRIDE: ${{ secrets.PYPI_PASSWORD_OVERRIDE }}
PYPI_TEST: ${{ secrets.PYPI_TEST }}
INDEX_URL_OVERRIDE: ${{ secrets.INDEX_URL_OVERRIDE }}
runs-on: ubuntu-latest
steps:

# Check out the commit containing this workflow file.
- name: checkout repo
uses: actions/checkout@v4
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'

- name: custom action
uses: spacetelescope/action-publish_to_pypi@master
id: custom_action_0
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
if: github.repository == 'spacetelescope/stginga'
environment:
name: release
url: https://pypi.org/p/stginga
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install python-build and twine
run: python -m pip install build "twine>=3.3"

- name: Build package
run: python -m build --sdist --wheel .

- name: List result
run: ls -l dist

- name: Check dist
run: python -m twine check --strict dist/*

- name: Test package
run: |
cd ..
python -m venv testenv
testenv/bin/pip install pytest-astropy ci-watson stginga_refactor/dist/*.whl
testenv/bin/python -c "import stginga; stginga.test()"
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
apt_packages:
- graphviz
tools:
python: "3.9"
python: "3.11"

sphinx:
builder: html
Expand Down
8 changes: 7 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1.4 (unreleased)
1.4 (2023-11-28)
----------------

Bug Fixes
Expand All @@ -7,6 +7,12 @@ Bug Fixes
- BackgroundSub and BadPixCorr plugins now no longer creates a zero-radius
circle when user clicks instead of drags on draw. [#228, #229]

Other Changes and Additions
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Keeping the code up-to-date with new upstream changes.
- Universal wheel for PyPI release.

1.3 (2021-06-11)
----------------

Expand Down

0 comments on commit ed94e52

Please sign in to comment.