Skip to content

Commit

Permalink
build: change PSR from local to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
luizdesuo committed Dec 14, 2023
1 parent eeea8ce commit 0145822
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 40 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,10 @@ jobs:
- name: Install package
run: poetry install

- name: Use Python Semantic Release to prepare release
env:
# This token is created automatically by GH Actions
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry run semantic-release publish
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
12 changes: 0 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ python = "^3.11"
click = ">=8.1.7"

[tool.poetry.group.dev.dependencies]
python-semantic-release = "^7.33.2"
pre-commit = ">=3.5.0"
nox = ">=2023.4.22"

Expand Down Expand Up @@ -86,17 +85,6 @@ lines_after_imports = 2
[tool.black]
line-length = 88

[tool.semantic_release]
version_variable = "pyproject.toml:version" # version location
branch = "main" # branch to make releases of
changelog_file = "CHANGELOG.md" # changelog file
build_command = "poetry build" # build dists
dist_path = "dist/" # where to put dists
upload_to_release = true # auto-create GitHub release
upload_to_pypi = false # don't auto-upload to PyPI
remove_dist = false # don't remove dists
patch_without_tag = true # patch release by default

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
12 changes: 4 additions & 8 deletions {{cookiecutter.project_name}}/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,10 @@ jobs:
- name: Install package
run: poetry install

- name: Use Python Semantic Release to prepare release
env:
# This token is created automatically by GH Actions
GH_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry run semantic-release publish
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}

{% if cookiecutter.publish -%}
- name: Publish to TestPyPI
Expand Down
12 changes: 0 additions & 12 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ icontract = ">=2.6.4"
{% endif -%}

[tool.poetry.group.dev.dependencies]
python-semantic-release = "^7.33.2"
pre-commit = ">=3.5.0"
nox = ">=2023.4.22"

Expand Down Expand Up @@ -104,17 +103,6 @@ lines_after_imports = 2
[tool.black]
line-length = 88

[tool.semantic_release]
version_variable = "pyproject.toml:version" # version location
branch = "main" # branch to make releases of
changelog_file = "CHANGELOG.md" # changelog file
build_command = "poetry build" # build dists
dist_path = "dist/" # where to put dists
upload_to_release = true # auto-create GitHub release
upload_to_pypi = false # don't auto-upload to PyPI
remove_dist = false # don't remove dists
patch_without_tag = true # patch release by default

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 0145822

Please sign in to comment.