-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
327371d
commit 61d717f
Showing
4 changed files
with
46 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish PyPI Package | ||
on: | ||
workflow_call: | ||
jobs: | ||
publish_to_pypi: | ||
name: Publish Python package to PyPI | ||
runs-on: ubuntu-latest | ||
# Set permissions for trusted publishing. | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/[email protected] | ||
# - name: Get the version from the github tag ref | ||
# id: get_version | ||
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
# - name: Update version (kept at 0.0.0) in pyproject.toml and build | ||
# run: | | ||
# poetry version ${{ github.ref_name }} | ||
# poetry build | ||
- name: Build package | ||
run: poetry build | ||
- name: Mint token | ||
id: mint | ||
uses: tschm/[email protected] | ||
- name: Publish the package with poetry | ||
run: | | ||
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
__version__ = "0.1.0" | ||
|
||
from admyral.logger import setup_root_logger | ||
|
||
setup_root_logger() |