From 9d7c00bf84d53073ca9225061551e0fdfba5429a Mon Sep 17 00:00:00 2001 From: Ed Slavich Date: Mon, 14 Feb 2022 14:39:40 -0500 Subject: [PATCH] Add changelog and actions workflows --- .github/workflows/changelog.yml | 19 +++++++++++++++++++ .github/workflows/publish-to-pypi.yml | 16 ++++++++++++++++ CHANGES.rst | 4 ++++ 3 files changed, 39 insertions(+) create mode 100644 .github/workflows/changelog.yml create mode 100644 .github/workflows/publish-to-pypi.yml create mode 100644 CHANGES.rst diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 00000000..3fd356ef --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,19 @@ +name: Changelog + +on: + pull_request: + types: [labeled, unlabeled, opened, synchronize, reopened] + +jobs: + changelog: + name: Confirm changelog entry + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: true + - name: Grep for PR number in CHANGES.rst + run: grep -P '\[[^\]]*#${{github.event.number}}[,\]]' CHANGES.rst + if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }} diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 00000000..63d53d89 --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,16 @@ +name: Publish to PyPI + +on: + release: + types: [released] + +jobs: + publish: + uses: spacetelescope/action-publish_to_pypi/.github/workflows/workflow.yml@master + with: + test: false + build_platform_wheels: false # Set to true if your package contains a C extension + secrets: + user: ${{ secrets.PYPI_USERNAME_ASDF_MAINTAINER }} + password: ${{ secrets.PYPI_PASSWORD_ASDF_MAINTAINER }} # WARNING: Do not hardcode secret values here! If you want to use a different user or password, you can override this secret by creating one with the same name in your Github repository settings. + test_password: ${{ secrets.PYPI_PASSWORD_ASDF_MAINTAINER_TEST }} diff --git a/CHANGES.rst b/CHANGES.rst new file mode 100644 index 00000000..bc65a622 --- /dev/null +++ b/CHANGES.rst @@ -0,0 +1,4 @@ +1.0.0 (unreleased) +------------------- + +- Add installable Python package to replace use of this repo as a submodule. [#292]