From d917f8f50b0c4605ac71448fd9cd9c91040976e3 Mon Sep 17 00:00:00 2001 From: wguanicedew Date: Tue, 12 Jul 2022 15:45:01 +0200 Subject: [PATCH 1/6] add version tag --- .github/workflows/python-publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b9139c7c..130955ee 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -26,6 +26,9 @@ jobs: uses: actions/setup-python@v3 with: python-version: '3.x' + - name: Get the version + id: get_version + run: echo ::set-output name=${GITHUB_REF/refs\/tags\//} - name: Install dependencies run: | python -m pip install --upgrade pip @@ -37,5 +40,7 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: | + version_tag=${GITHUB_REF/refs\/tags\//} + python main/tools/pypi/update_version.py ${version_tag} python setup.py sdist bdist_wheel twine upload */dist/idds*-${version}.tar.gz From a03ccca742eb8de6ca63917831156871652bc332 Mon Sep 17 00:00:00 2001 From: wguanicedew Date: Tue, 12 Jul 2022 16:26:18 +0200 Subject: [PATCH 2/6] update pypi action --- .github/workflows/python-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 130955ee..1f8fe4f2 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -11,6 +11,8 @@ name: PyPi on: release: types: [published] + + workflow_dispatch: permissions: contents: read From 944d63ac0a25a6e631a173a1e5f5dc865aff00b3 Mon Sep 17 00:00:00 2001 From: wguanicedew Date: Tue, 12 Jul 2022 16:31:47 +0200 Subject: [PATCH 3/6] test --- .github/workflows/python-publish.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1f8fe4f2..4d8f4f7f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -43,6 +43,8 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: | version_tag=${GITHUB_REF/refs\/tags\//} - python main/tools/pypi/update_version.py ${version_tag} - python setup.py sdist bdist_wheel - twine upload */dist/idds*-${version}.tar.gz + echo ${GITHUB_REF} + echo ${version_tag} + # python main/tools/pypi/update_version.py ${version_tag} + # python setup.py sdist bdist_wheel + # twine upload */dist/idds*-${version}.tar.gz From 0e87cdf1253b2f4b54cd25ee0db9bb87cea69a87 Mon Sep 17 00:00:00 2001 From: wguanicedew Date: Tue, 12 Jul 2022 16:36:01 +0200 Subject: [PATCH 4/6] test --- .github/workflows/python-publish.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4d8f4f7f..1a9d20ec 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -43,8 +43,9 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: | version_tag=${GITHUB_REF/refs\/tags\//} - echo ${GITHUB_REF} - echo ${version_tag} - # python main/tools/pypi/update_version.py ${version_tag} - # python setup.py sdist bdist_wheel - # twine upload */dist/idds*-${version}.tar.gz + version_tag=${version_tag/refs\/heads\//} + # echo ${GITHUB_REF} + # echo ${version_tag} + python main/tools/pypi/update_version.py ${version_tag} + python setup.py sdist bdist_wheel + twine upload */dist/idds*-${version}.tar.gz From e7bb6a6d550e57335a9eacf028d36c8c93e22a09 Mon Sep 17 00:00:00 2001 From: wguanicedew Date: Tue, 12 Jul 2022 17:40:29 +0200 Subject: [PATCH 5/6] test --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1a9d20ec..356774e0 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -48,4 +48,4 @@ jobs: # echo ${version_tag} python main/tools/pypi/update_version.py ${version_tag} python setup.py sdist bdist_wheel - twine upload */dist/idds*-${version}.tar.gz + twine upload */dist/idds*-${version_tag}.tar.gz From 56070f092d00c128bbe3c71ed5187f9c9d38ce1d Mon Sep 17 00:00:00 2001 From: wguanicedew Date: Tue, 12 Jul 2022 18:18:33 +0200 Subject: [PATCH 6/6] test conda --- .github/workflows/publish_conda.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/publish_conda.yml diff --git a/.github/workflows/publish_conda.yml b/.github/workflows/publish_conda.yml new file mode 100644 index 00000000..f2939bb4 --- /dev/null +++ b/.github/workflows/publish_conda.yml @@ -0,0 +1,17 @@ +name: publish_conda + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: publish-to-conda + uses: fcakyon/conda-publish-action@v1.3 + with: + subdir: 'conda' + anacondatoken: ${{ secrets.CONDA_TOKEN }} + platforms: 'win osx linux'