Skip to content

Commit

Permalink
feat: semantic release (#114)
Browse files Browse the repository at this point in the history
* feat: semantic release

* fix: if statement issue
  • Loading branch information
skim2257 committed May 29, 2024
1 parent f43d042 commit 23a2d70
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ jobs:
# Set up operating system
runs-on: ubuntu-latest

# outputs:
# released: ${{ steps.release.outputs.released }}
# version: ${{ steps.release.outputs.version }}
# tag: ${{ steps.release.outputs.tag }}
outputs:
released: ${{ steps.release.outputs.released }}
version: ${{ steps.release.outputs.version }}
tag: ${{ steps.release.outputs.tag }}

# Define job steps
steps:
Expand All @@ -109,9 +109,16 @@ jobs:
with:
fetch-depth: 0

- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

pip-squeak:
needs: cd
# if: needs.cd.outputs.released == 'true'
if: |
needs.cd.outputs.released == 'true' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout the code with tag # ${{ needs.cd.outputs.tag }}
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ authors = ["Sejin Kim, Benjamin Haibe-Kains"]
license = "GPL-3.0"
readme = "README.md"

[tool.semantic_release]
version_variables = ["src/imgtools/__init__.py:__version__"]

[tool.poetry.group.dev]
optional = true

Expand Down

0 comments on commit 23a2d70

Please sign in to comment.