Skip to content

Commit

Permalink
Merge pull request #727 from kmaehashi/add-release-automation
Browse files Browse the repository at this point in the history
add release automation workflow
  • Loading branch information
linshokaku authored Jul 24, 2023
2 parents 8377465 + 69f64c5 commit 66765c7
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Publish to PyPI"
on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: python3 -m pip install build --user
- name: Build Packages
run: python3 -m build --sdist --outdir dist/ .
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist

publish:
needs: build
runs-on: ubuntu-22.04
permissions:
id-token: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Enumerate Files
run: find dist -ls
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 66765c7

Please sign in to comment.