Skip to content

Commit

Permalink
Merge pull request #2 from mypaceshun/github-actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
mypaceshun committed Dec 16, 2021
2 parents 11363c8 + fe8d93d commit 1b2f82a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release
on:
push:
tags:
- '*.*.*'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Update pip
run: pip install -U pip setuptools wheel
- name: Install poetry
run: pip install poetry poetry-dynamic-versioning
- name: Install dependent libraries
run: poetry install
- name: Build package
run: poetry build
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: 'dist/*'
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- github-actions-demo
paths-ignore:
- '*.md'

Expand Down Expand Up @@ -60,5 +59,5 @@ jobs:
run: pip install poetry poetry-dynamic-versioning
- name: install libraries
run: poetry install
- name: run lint
- name: run test
run: poetry run poe test
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ packages = [
]
include = ["CHANGELOG.md"]

[tool.poetry-dynamic-versioning]
enable = true
vcs = 'git'
style = 'pep440'

[tool.poetry.dependencies]
python = "^3.7"
click = "^8.0"
Expand Down

0 comments on commit 1b2f82a

Please sign in to comment.