Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit ed94e52

Browse files
committed
Prepping for release: 1.4.0
1 parent f7b77d8 commit ed94e52

File tree

3 files changed

+56
-27
lines changed

3 files changed

+56
-27
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,53 @@
1-
name: Publish to PyPI
1+
name: Release
22

33
on:
4+
workflow_dispatch:
45
release:
56
types: [released]
67

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
712
jobs:
8-
build:
9-
name: Publish release to PyPI
10-
env:
11-
PYPI_USERNAME_STSCI_MAINTAINER: ${{ secrets.PYPI_USERNAME_STSCI_MAINTAINER }}
12-
PYPI_PASSWORD_STSCI_MAINTAINER: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
13-
PYPI_USERNAME_OVERRIDE: ${{ secrets.PYPI_USERNAME_OVERRIDE }}
14-
PYPI_PASSWORD_OVERRIDE: ${{ secrets.PYPI_PASSWORD_OVERRIDE }}
15-
PYPI_TEST: ${{ secrets.PYPI_TEST }}
16-
INDEX_URL_OVERRIDE: ${{ secrets.INDEX_URL_OVERRIDE }}
17-
runs-on: ubuntu-latest
18-
steps:
19-
20-
# Check out the commit containing this workflow file.
21-
- name: checkout repo
22-
uses: actions/checkout@v4
23-
with:
24-
# Number of commits to fetch. 0 indicates all history for all branches and tags.
25-
# Default: 1
26-
fetch-depth: '0'
27-
28-
- name: custom action
29-
uses: spacetelescope/action-publish_to_pypi@master
30-
id: custom_action_0
13+
build-n-publish:
14+
name: Build and publish Python 🐍 distributions 📦 to PyPI
15+
runs-on: ubuntu-latest
16+
if: github.repository == 'spacetelescope/stginga'
17+
environment:
18+
name: release
19+
url: https://pypi.org/p/stginga
20+
permissions:
21+
id-token: write # IMPORTANT: mandatory for trusted publishing
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- uses: actions/setup-python@v4
29+
with:
30+
python-version: '3.x'
31+
32+
- name: Install python-build and twine
33+
run: python -m pip install build "twine>=3.3"
34+
35+
- name: Build package
36+
run: python -m build --sdist --wheel .
37+
38+
- name: List result
39+
run: ls -l dist
40+
41+
- name: Check dist
42+
run: python -m twine check --strict dist/*
43+
44+
- name: Test package
45+
run: |
46+
cd ..
47+
python -m venv testenv
48+
testenv/bin/pip install pytest-astropy ci-watson stginga_refactor/dist/*.whl
49+
testenv/bin/python -c "import stginga; stginga.test()"
50+
51+
- name: Publish distribution 📦 to PyPI
52+
if: github.event_name == 'release'
53+
uses: pypa/gh-action-pypi-publish@release/v1

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
version: 2
44

55
build:
6-
os: ubuntu-20.04
6+
os: ubuntu-22.04
77
apt_packages:
88
- graphviz
99
tools:
10-
python: "3.9"
10+
python: "3.11"
1111

1212
sphinx:
1313
builder: html

CHANGES.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1.4 (unreleased)
1+
1.4 (2023-11-28)
22
----------------
33

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

10+
Other Changes and Additions
11+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
- Keeping the code up-to-date with new upstream changes.
14+
- Universal wheel for PyPI release.
15+
1016
1.3 (2021-06-11)
1117
----------------
1218

0 commit comments

Comments
 (0)