Skip to content

Commit

Permalink
setting up deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
chanind committed Nov 22, 2023
1 parent 9dc7a81 commit 369660c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,32 @@ jobs:
run: poetry run pytest
- name: build
run: poetry build
release:
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@v4
with:
fetch-depth: 0
- name: Semantic Release
id: release
uses: python-semantic-release/[email protected]
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 }}
2 changes: 2 additions & 0 deletions linear_relational/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__version__ = "0.0.1"

from .CausalEditor import (
CausalEditor,
ConceptSwapAndPredictGreedyRequest,
Expand Down
15 changes: 11 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ authors = ["David Chanin <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
python = ">=3.10"
transformers = "^4.35.2"
sentencepiece = "^0.1.99"
tqdm = "^4.66.1"
protobuf = "^4.25.0"
tqdm = ">=4.0.0"
dataclasses-json = "^0.6.2"


Expand All @@ -28,3 +26,12 @@ build-backend = "poetry.core.masonry.api"

[tool.isort]
profile = "black"


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

0 comments on commit 369660c

Please sign in to comment.