From cad7df7e92253dfd77be1ba145374084b465efea Mon Sep 17 00:00:00 2001 From: Pavel Dat Date: Tue, 12 Sep 2023 15:53:18 +0300 Subject: [PATCH 1/2] Check creating release package --- .github/workflows/deploy-job.yml | 43 +------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/.github/workflows/deploy-job.yml b/.github/workflows/deploy-job.yml index 9195c73..df8109d 100644 --- a/.github/workflows/deploy-job.yml +++ b/.github/workflows/deploy-job.yml @@ -32,50 +32,9 @@ jobs: name: built-artifacts path: dist retention-days: 1 - test: - runs-on: ubuntu-latest - needs: build - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - sudo apt install pycodestyle pylint - pip install -r py-requirements.txt - pip install pytest - - name: Analysing the code with pycodestyle - run: | - pycodestyle src/**/*.py - - name: Analysing the code with pylint - run: | - pylint src/**/*.py - - name: Run Module tests - run: | - python3 -m pytest -sr tests/test_c*.py - deploy: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - needs: test - steps: - - uses: actions/checkout@v3 - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: built-artifacts - path: dist - - name: Publish package to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository-url: https://test.pypi.org/legacy/ - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} release: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - needs: deploy + needs: build steps: - uses: actions/checkout@v3 - name: Download artifacts From 6592235d3fe004b3643f2e47ed94bb81e6c5b9f3 Mon Sep 17 00:00:00 2001 From: Pavel Dat Date: Tue, 12 Sep 2023 15:57:55 +0300 Subject: [PATCH 2/2] Chnage action to release package --- .github/workflows/deploy-job.yml | 43 +++++++++++++++++++++++++++++++- CHANGELOG.md | 3 +++ setup.cfg | 2 +- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-job.yml b/.github/workflows/deploy-job.yml index df8109d..9195c73 100644 --- a/.github/workflows/deploy-job.yml +++ b/.github/workflows/deploy-job.yml @@ -32,9 +32,50 @@ jobs: name: built-artifacts path: dist retention-days: 1 - release: + test: runs-on: ubuntu-latest needs: build + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + sudo apt install pycodestyle pylint + pip install -r py-requirements.txt + pip install pytest + - name: Analysing the code with pycodestyle + run: | + pycodestyle src/**/*.py + - name: Analysing the code with pylint + run: | + pylint src/**/*.py + - name: Run Module tests + run: | + python3 -m pytest -sr tests/test_c*.py + deploy: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + needs: test + steps: + - uses: actions/checkout@v3 + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: built-artifacts + path: dist + - name: Publish package to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + release: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + needs: deploy steps: - uses: actions/checkout@v3 - name: Download artifacts diff --git a/CHANGELOG.md b/CHANGELOG.md index c0e35d2..b906c1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # gods_eye changelog +## 1.0.7 +- Fix release job to publish release package. + ## 1.0.6 - Add pipeline. Add deploy to PyPI. diff --git a/setup.cfg b/setup.cfg index 3bec01a..cebf061 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = gods_eye -version = 1.0.6 +version = 1.0.7 author = Pavel Dat author_email = dats.pavel1999@gmail.com description = A set of tools which should be used in Gods Eye