From 919a2e1473739ab56f97e7c8e262560fcbb4cb0a Mon Sep 17 00:00:00 2001 From: Doug Applegate Date: Wed, 10 Apr 2024 14:35:02 -0600 Subject: [PATCH] testing github workflow 10 --- .github/workflows/ncm_bump_version.yaml | 29 ------------- .github/workflows/ncm_pypi_package.yaml | 55 +++++++++++++------------ ncm/.bumpversion.cfg | 1 - 3 files changed, 29 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/ncm_bump_version.yaml diff --git a/.github/workflows/ncm_bump_version.yaml b/.github/workflows/ncm_bump_version.yaml deleted file mode 100644 index 2aec56d..0000000 --- a/.github/workflows/ncm_bump_version.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: bump version - -on: - push: - paths: - - "ncm/**" - -jobs: - bump_version: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" # specify the version of Python you're using - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install bump2version - git config --global user.email "github_action@example.com" - git config --global user.name "Github Action" - - name: Bump version - run: | - cd ncm && bump2version patch - - name: Push changes - run: | - git push && git push --tags diff --git a/.github/workflows/ncm_pypi_package.yaml b/.github/workflows/ncm_pypi_package.yaml index dad0a4e..d557e6d 100644 --- a/.github/workflows/ncm_pypi_package.yaml +++ b/.github/workflows/ncm_pypi_package.yaml @@ -1,34 +1,37 @@ -name: pypi package ncm api +name: bump version on: push: - tags: - - 'v*' + paths: + - "ncm/**" jobs: - build: - + bump_version: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' # specify the version of Python you're using - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install wheel twine build - - - name: Build package - run: cd ncm && python -m build --sdist --wheel - - - name: Upload to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # make sure you have set up the secret in your repository settings - run: | - cd ncm && twine upload dist/* \ No newline at end of file + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install wheel twine build bump2version + git config --global user.email "github_action@example.com" + git config --global user.name "Github Action" + - name: Bump version + run: | + cd ncm && bump2version patch + - name: Push changes + run: | + git push + - name: Build package + run: cd ncm && python -m build --sdist --wheel + - name: Upload to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + cd ncm && twine upload dist/* \ No newline at end of file diff --git a/ncm/.bumpversion.cfg b/ncm/.bumpversion.cfg index 380fe65..99aafdb 100644 --- a/ncm/.bumpversion.cfg +++ b/ncm/.bumpversion.cfg @@ -1,6 +1,5 @@ [bumpversion] current_version = 0.0.33 commit = True -tag = True [bumpversion:file:setup.py]