-
Notifications
You must be signed in to change notification settings - Fork 1
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
d17cafa
commit b37e756
Showing
8 changed files
with
135 additions
and
135 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
rule: | ||
description: "Rule to run" | ||
required: false | ||
default: patch | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
- premajor | ||
- preminor | ||
- prepatch | ||
- prerelease | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
- name: Get changelog | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
dry_run: true | ||
|
||
- name: Update version | ||
run: | | ||
poetry version ${{ github.event.inputs.rule }} | ||
version=$(poetry version -s) | ||
echo "VERSION=$version" >> $GITHUB_ENV | ||
- name: Commit and push changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -am "[skip ci] Update version to ${{ env.VERSION }}" | ||
git push | ||
- name: Create and push tag | ||
run: | | ||
git tag v${{ env.VERSION }} | ||
git push origin v${{ env.VERSION }} | ||
- name: Create GitHub Release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: v${{ env.VERSION }} | ||
release_name: Release v${{ env.VERSION }} | ||
draft: false | ||
prerelease: false | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
|
||
- name: Publish package | ||
env: | ||
PYPI_LOCAL_USERNAME: __token__ | ||
PYPI_LOCAL_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
poetry build | ||
poetry publish -u $PYPI_LOCAL_USERNAME -p $PYPI_LOCAL_PASSWORD | ||
- name: Generate docs | ||
run: | | ||
cp ./readme.md ./docs_src/readme.md | ||
poetry run sphinx-apidoc -f -o ./docs_src ./ddb_single | ||
poetry run sphinx-build ./docs_src ./docs | ||
- name: Publish github pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: ./docs | ||
clean: true | ||
commit-message: Deploy as of ${{ github.sha }} |
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 |
---|---|---|
|
@@ -6,4 +6,5 @@ build | |
dist | ||
shared-local-instance.db | ||
.coverage | ||
docs | ||
docs | ||
poetry.lock |
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,25 @@ | ||
|
||
[tool.poetry] | ||
name = "ddb_single" | ||
version = "0.4.7" | ||
description = "Python DynamoDB interface, specialized in single-table design." | ||
authors = ["medaka <[email protected]>"] | ||
license = "MIT" | ||
homepage = "https://medaka0213.github.io/DynamoDB-SingleTable/" | ||
repository = "https://github.com/medaka0213/DynamoDB-SingleTable" | ||
keywords = ["aws", "dynamodb", "serverless"] | ||
packages = [{ include = "ddb_single" }] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
boto3 = "^1.34.79" | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
sphinx = "^7.2.6" | ||
sphinx-rtd-theme = "^2.0.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
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 was deleted.
Oops, something went wrong.