Skip to content

Commit

Permalink
Chnage action to release package
Browse files Browse the repository at this point in the history
  • Loading branch information
paveldat committed Sep 12, 2023
1 parent cad7df7 commit 6592235
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
43 changes: 42 additions & 1 deletion .github/workflows/deploy-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 6592235

Please sign in to comment.