Skip to content

Commit

Permalink
ci: properly use version during setup of python
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarkoulis committed Aug 27, 2024
1 parent c1988da commit 1b5f8ac
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
name: documentation
path: docs/_build/html
- name: Upload to read the docs
if: ${{ github.event.inputs.upload_docs }}
if: ${{ inputs.upload_docs == 'true' || inputs.upload_docs == true }}
run: curl -X POST -d "branches=master" -d "token=${{ secrets.RTDS_WEBHOOK_TOKEN }}" ${{ secrets.RTDS_WEBHOOK_URL }}
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Checkout Repository
uses: actions/checkout@v4
with:
Expand All @@ -34,16 +36,12 @@ jobs:
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
run: make dep
- name: Configure pypi token
run: |
poetry config pypi-token.pypi ${{ secrets.pypi_password }}
- name: Build and publish package
run: |
poetry build
poetry publish
run: make publish-package

release-github:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ jobs:
uses: ./.github/workflows/docs.yml
with:
upload_docs: true
secrets:
RTDS_WEBHOOK_TOKEN: ${{ secrets.RTDS_WEBHOOK_TOKEN }}
RTDS_WEBHOOK_URL: ${{ secrets.RTDS_WEBHOOK_URL }}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ build-sphinx: install-as-library
build-package: install-as-library
poetry build

publish-package: install-as-library
poetry publish --build

migrate_to_jira: install-as-library
poetry run migrate_to_jira
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ name = "cz_conventional_commits"
version = "1.1.0"
tag_format = "v$version"
version_files = [
"setup.py:version",
".cz.toml:version",
"pyproject.toml:version",
"docs/conf.py:version",
]
update_changelog_on_bump = true
Expand Down

0 comments on commit 1b5f8ac

Please sign in to comment.