Skip to content

Commit

Permalink
chore: updating semantic release config
Browse files Browse the repository at this point in the history
  • Loading branch information
chanind committed Sep 13, 2023
1 parent 46260d6 commit b30ea37
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,28 @@ jobs:
needs: lint_test_and_build
permissions:
contents: write
id-token: write
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
concurrency: release
environment:
name: pypi
url: https://pypi.org/p/frame-semantic-transformer
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Semantic Release
uses: relekang/python-semantic-release@v7.33.1
id: release
uses: python-semantic-release/python-semantic-release@v8.0.7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.semantic_release]
version_variable = [
version_variables = [
"frame_semantic_transformer/__init__.py:__version__",
"pyproject.toml:version"
"pyproject.toml:version",
]
branch = "main"
upload_to_pypi = true
upload_to_release = true
build_command = "pip install poetry && poetry build"
build_command = "pip install poetry && poetry build"

0 comments on commit b30ea37

Please sign in to comment.