Skip to content

Commit

Permalink
ci: リリースタグを打ったら自動でリリースされる
Browse files Browse the repository at this point in the history
  • Loading branch information
Javakky committed Apr 12, 2023
1 parent 703e663 commit b9d152c
Show file tree
Hide file tree
Showing 4 changed files with 286 additions and 267 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

name: Python Test

on: [push]
on:
push:
branches:
- master
pull_request:

jobs:
pytest:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
tags: ["*"]

jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry poetry-dynamic-versioning twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry publish --build --username $TWINE_USERNAME --password $TWINE_PASSWORD
Loading

0 comments on commit b9d152c

Please sign in to comment.