From da4611a47cb857621ad59b4e1f10263f5e1f1739 Mon Sep 17 00:00:00 2001 From: Kyle McChesney Date: Tue, 26 Mar 2024 15:41:04 -0600 Subject: [PATCH 1/3] Move dev push to on push tag (cannot reupload), add rest of prod push, github release, signed, etc --- .bumpversion.cfg | 2 +- .github/workflows/merge.yaml | 25 ---------- .github/workflows/release.yaml | 84 ++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.bumpversion.cfg b/.bumpversion.cfg index cb4a0ce..15206de 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,7 +1,7 @@ [bumpversion] current_version = 0.0.1 commit = True -tag = True +tag = False [bumpversion:file:setup.py] diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index dab5180..005fc2b 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -18,28 +18,3 @@ jobs: build: needs: [test, lint, docs] uses: ./.github/workflows/build.yaml - - test-release: - name: publish to test pypi - needs: build - runs-on: ubuntu-latest - if: ${{ github.repository == 'mammothbio-os/palamedes' }} - - environment: - name: test-release - url: https://test.pypi.org/p/palamedes - - permissions: - id-token: write - - steps: - - name: download build - uses: actions/download-artifact@v3 - with: - name: python-package-distributions - path: dist/ - - - name: publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..958c4a0 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,84 @@ +name: release + +on: + push: + tags: + - "*" + +jobs: + build: + if: ${{ github.repository == 'mammothbio-os/palamedes' }} + uses: ./.github/workflows/build.yaml + + test-release: + name: publish to test pypi + needs: build + runs-on: ubuntu-latest + + environment: + name: test-release + url: https://test.pypi.org/p/palamedes + + permissions: + id-token: write + + steps: + - name: download build + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + - name: publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + + release: + needs: test-release + environment: release + runs-on: ubuntu-latest + permissions: + id-token: write + + steps: + - name: download build + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + - name: publish + uses: pypa/gh-action-pypi-publish@release/v1 + + release-github: + needs: release + runs-on: ubuntu-latest + + permissions: + contents: write + id-token: write + + steps: + - name: download build + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + - name: sign + uses: sigstore/gh-action-sigstore-python@v1.2.3 + with: + inputs: >- + ./dist/*.tar.gz + ./dist/*.whl + + - name: create release + env: + GITHUB_TOKEN: ${{ github.token }} + run: gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes "" + + - name: upload release artifacts + env: + GITHUB_TOKEN: ${{ github.token }} + run: gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' From cd1a998b6f2d3f37204e9e0b0704e1d898dbe5a4 Mon Sep 17 00:00:00 2001 From: Kyle McChesney Date: Tue, 26 Mar 2024 15:41:17 -0600 Subject: [PATCH 2/3] =?UTF-8?q?Bump=20version:=200.0.1=20=E2=86=92=200.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- palamedes/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 15206de..22dd0fe 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.1 +current_version = 0.0.2 commit = True tag = False diff --git a/palamedes/__init__.py b/palamedes/__init__.py index 4d83ebd..f727090 100644 --- a/palamedes/__init__.py +++ b/palamedes/__init__.py @@ -8,7 +8,7 @@ from palamedes.hgvs.builders import BUILDER_CONFIG -__version__ = "0.0.1" +__version__ = "0.0.2" def generate_hgvs_variants( diff --git a/setup.py b/setup.py index 3142720..d8ae14a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -version = "0.0.1" +version = "0.0.2" setup( name="palamedes", From e6770e1d64cb395afdbc01b688d8b817fb9f7ad0 Mon Sep 17 00:00:00 2001 From: Kyle McChesney Date: Tue, 26 Mar 2024 15:43:10 -0600 Subject: [PATCH 3/3] non deprecated bump tool --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index e2163b3..3156e18 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -5,6 +5,6 @@ pytest-cov~=2.11.1 pytest~=6.2.1 ipdb~=0.13.4 sphinx~=7.2.6 -bumpversion~=0.6.0 sphinx-rtd-theme~=2.0.0 myst-parser~=2.0.0 +bump-my-version~=0.19.3