From b9d33bb37b739ef6f8ea4d001193bc67f760cc06 Mon Sep 17 00:00:00 2001 From: yemeen Date: Tue, 14 Jan 2025 14:25:22 -0500 Subject: [PATCH] Remove testpypi workflow and revert from release based to on main push releases --- .../create-release-on-version-bump.yml | 37 ------------------ .github/workflows/python-publish-test.yml | 39 ------------------- .github/workflows/python-publish.yml | 8 ++-- 3 files changed, 4 insertions(+), 80 deletions(-) delete mode 100644 .github/workflows/create-release-on-version-bump.yml delete mode 100644 .github/workflows/python-publish-test.yml diff --git a/.github/workflows/create-release-on-version-bump.yml b/.github/workflows/create-release-on-version-bump.yml deleted file mode 100644 index 9b2af34..0000000 --- a/.github/workflows/create-release-on-version-bump.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Create Release on Version Bump - -on: - push: - branches: - - main - -jobs: - tag-and-release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Extract version - id: get_version - run: | - version=$(grep -m1 'version = ' pyproject.toml | cut -d'"' -f2) - echo "::set-output name=VERSION::$version" - - - name: Create Tag - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git tag v${{ steps.get_version.outputs.VERSION }} - git push origin v${{ steps.get_version.outputs.VERSION }} - - - name: Create Release - uses: softprops/action-gh-release@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag_name: v${{ steps.get_version.outputs.VERSION }} - name: Release ${{ steps.get_version.outputs.VERSION }} - body: | - Release of version ${{ steps.get_version.outputs.VERSION }} - draft: false - prerelease: false diff --git a/.github/workflows/python-publish-test.yml b/.github/workflows/python-publish-test.yml deleted file mode 100644 index ee523ae..0000000 --- a/.github/workflows/python-publish-test.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package - -on: - pull_request: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_TEST}} diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index fe56683..33535fd 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,14 +9,15 @@ name: Upload Python Package on: - release: - types: [created] + push: + branches: [ "main" ] permissions: contents: read jobs: deploy: + runs-on: ubuntu-latest steps: @@ -35,5 +36,4 @@ jobs: uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: user: __token__ - password: ${{ secrets.PYPI }} - + password: ${{ secrets.PYPI}}