From 237efa40acea1f83f26e5ef4aa5c2158951eee3b Mon Sep 17 00:00:00 2001 From: Steve Zeltmann <37132012+sezelt@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:19:31 -0400 Subject: [PATCH] Update pypi_upload.yml oops --- .github/workflows/pypi_upload.yml | 162 +++++++++++++++--------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index dd9bbe3f0..900d6cf94 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -1,87 +1,87 @@ -# Action to check the version of the package and upload it to PyPI -# if the version is higher than the one on PyPI -name: PyPI Upload +# # Action to check the version of the package and upload it to PyPI +# # if the version is higher than the one on PyPI +# name: PyPI Upload -on: - push: - branches: - - main - # pull_request: - # branches: - # - main +# on: +# push: +# branches: +# - main +# # pull_request: +# # branches: +# # - main -jobs: - update_version: - runs-on: ubuntu-latest - name: Check if version.py is changed and update if the version.py is not changed - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GH_ACTION_VERSION_UPDATE }} - - name: Get changed files - id: changed-files-specific - uses: tj-actions/changed-files@v43 - with: - files: | - py4DSTEM/version.py - - name: Debug version file change checker - run: | - echo "Checking variable..." - echo ${{ steps.changed-files-specific.outputs.any_changed }} - echo "Done" - - name: Running if py4DSTEM/version.py file is not changed - if: steps.changed-files-specific.outputs.any_changed == 'false' - run: | - echo "Version file not changed, running script to change the version file." - #git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} - python .github/scripts/update_version.py - git config --global user.email "ben.savitzky@gmail.com" - git config --global user.name "bsavitzky" - git commit -a -m "Auto-update version number (GH Action)" - git push origin +# jobs: +# update_version: +# runs-on: ubuntu-latest +# name: Check if version.py is changed and update if the version.py is not changed +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# token: ${{ secrets.GH_ACTION_VERSION_UPDATE }} +# - name: Get changed files +# id: changed-files-specific +# uses: tj-actions/changed-files@v43 +# with: +# files: | +# py4DSTEM/version.py +# - name: Debug version file change checker +# run: | +# echo "Checking variable..." +# echo ${{ steps.changed-files-specific.outputs.any_changed }} +# echo "Done" +# - name: Running if py4DSTEM/version.py file is not changed +# if: steps.changed-files-specific.outputs.any_changed == 'false' +# run: | +# echo "Version file not changed, running script to change the version file." +# #git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} +# python .github/scripts/update_version.py +# git config --global user.email "ben.savitzky@gmail.com" +# git config --global user.name "bsavitzky" +# git commit -a -m "Auto-update version number (GH Action)" +# git push origin - sync_with_dev: - needs: update_version - runs-on: ubuntu-latest - name: Sync main with dev - steps: - - name: Sync main with dev - uses: actions/checkout@v4 - with: - ref: dev - fetch-depth: 0 - token: ${{ secrets.GH_ACTION_VERSION_UPDATE }} - - run: | - # set strategy to default merge - git config pull.rebase false - git config --global user.email "ben.savitzky@gmail.com" - git config --global user.name "bsavitzky" - git pull origin main --commit --no-edit - git push origin dev - deploy: - needs: sync_with_dev - runs-on: ubuntu-latest - name: Deploy to PyPI - steps: - - uses: actions/checkout@v4 - with: - ref: dev - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - - 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@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} +# sync_with_dev: +# needs: update_version +# runs-on: ubuntu-latest +# name: Sync main with dev +# steps: +# - name: Sync main with dev +# uses: actions/checkout@v4 +# with: +# ref: dev +# fetch-depth: 0 +# token: ${{ secrets.GH_ACTION_VERSION_UPDATE }} +# - run: | +# # set strategy to default merge +# git config pull.rebase false +# git config --global user.email "ben.savitzky@gmail.com" +# git config --global user.name "bsavitzky" +# git pull origin main --commit --no-edit +# git push origin dev +# deploy: +# needs: sync_with_dev +# runs-on: ubuntu-latest +# name: Deploy to PyPI +# steps: +# - uses: actions/checkout@v4 +# with: +# ref: dev +# - name: Set up Python +# uses: actions/setup-python@v5 +# with: +# python-version: 3.8 +# - 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@release/v1 +# with: +# user: __token__ +# password: ${{ secrets.PYPI_API_TOKEN }}