From df0c4f07ecf11486efa3d670b0844f1c69edfd9e Mon Sep 17 00:00:00 2001 From: Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com> Date: Fri, 20 Jan 2023 11:27:54 +0700 Subject: [PATCH 1/5] [ENGA3-791] : add workflow to publish package --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..49935ab --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish + +on: + push: + +# on: +# release: +# types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Build and Upload + run: | + python -m venv venv + source venv/bin/activate + pip install --upgrade pip twine wheel + python setup.py bdist_wheel + twine upload dist/* --verbose --username __token__ --password ${{ secrets.ABCD_TOKEN }} From ab03570c4a7c994cc5db9a2807ea1e7fac871d56 Mon Sep 17 00:00:00 2001 From: Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com> Date: Fri, 20 Jan 2023 11:29:05 +0700 Subject: [PATCH 2/5] [ENGA3-791] : change trigger point to release --- .github/workflows/publish.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 49935ab..26d9d6a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,11 +1,8 @@ name: Publish on: - push: - -# on: -# release: -# types: [created] + release: + types: [created] jobs: publish: @@ -26,4 +23,4 @@ jobs: source venv/bin/activate pip install --upgrade pip twine wheel python setup.py bdist_wheel - twine upload dist/* --verbose --username __token__ --password ${{ secrets.ABCD_TOKEN }} + twine upload dist/* --verbose --username __token__ --password ${{ secrets.PYPI_TOKEN }} From 52fa056a4e371a73e8641de0e9be14c73cdf938b Mon Sep 17 00:00:00 2001 From: Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com> Date: Fri, 20 Jan 2023 11:47:34 +0700 Subject: [PATCH 3/5] [ENGA3-791] : publish using test-pypi --- .github/workflows/publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 26d9d6a..8715530 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,11 @@ name: Publish on: - release: - types: [created] + push: + +# on: +# release: +# types: [created] jobs: publish: @@ -23,4 +26,4 @@ jobs: source venv/bin/activate pip install --upgrade pip twine wheel python setup.py bdist_wheel - twine upload dist/* --verbose --username __token__ --password ${{ secrets.PYPI_TOKEN }} + twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose --username __token__ --password ${{ secrets.TEST_PYPI_TOKEN }} From 301e2db3e1df4a38b5599e0b4b0f3430d048e2ed Mon Sep 17 00:00:00 2001 From: Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com> Date: Fri, 20 Jan 2023 11:55:18 +0700 Subject: [PATCH 4/5] [ENGA3-791] : change version to publish with sdist --- .github/workflows/publish.yml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8715530..5761689 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,5 +25,5 @@ jobs: python -m venv venv source venv/bin/activate pip install --upgrade pip twine wheel - python setup.py bdist_wheel + python setup.py sdist bdist_wheel twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose --username __token__ --password ${{ secrets.TEST_PYPI_TOKEN }} diff --git a/setup.py b/setup.py index 5fb4e65..4c39cae 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ setup(name='omise', long_description=long_description, long_description_content_type='text/markdown', - version='0.11.0', + version='0.11.1', description='Omise Python client', author='Omise', author_email='support@omise.co', From 3539d678761ff6b7c2d16bb32564174bfbb54028 Mon Sep 17 00:00:00 2001 From: Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com> Date: Fri, 20 Jan 2023 12:00:39 +0700 Subject: [PATCH 5/5] [ENGA3-791] : switch back on release created and production PYPI_TOKEN --- .github/workflows/publish.yml | 9 +++------ setup.py | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5761689..baa044c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,11 +1,8 @@ name: Publish on: - push: - -# on: -# release: -# types: [created] + release: + types: [created] jobs: publish: @@ -26,4 +23,4 @@ jobs: source venv/bin/activate pip install --upgrade pip twine wheel python setup.py sdist bdist_wheel - twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose --username __token__ --password ${{ secrets.TEST_PYPI_TOKEN }} + twine upload dist/* --verbose --username __token__ --password ${{ secrets.PYPI_TOKEN }} diff --git a/setup.py b/setup.py index 4c39cae..5fb4e65 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ setup(name='omise', long_description=long_description, long_description_content_type='text/markdown', - version='0.11.1', + version='0.11.0', description='Omise Python client', author='Omise', author_email='support@omise.co',