Skip to content

Commit

Permalink
chore: add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Mar 22, 2023
1 parent b79ec36 commit c136c04
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
71 changes: 71 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release to PyPI

permissions:
contents: write

on:
push:
tags:
- "v*"

jobs:
build:
name: build dist files
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: install build
run: python -m pip install --upgrade build

- name: build dist
run: python -m build

- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error

publish:
environment:
name: pypi-release

name: release to pypi
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
with:
name: artifacts
path: dist

- name: Push build artifacts to PyPI
uses: pypa/[email protected]
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

release:
name: write release note
runs-on: ubuntu-latest
needs: publish

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npx changelogithub --no-group
continue-on-error: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
max-parallel: 6
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.9"]
python: ["3.8", "3.9", "3.10", "3.11", "pypy3.9"]

steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit c136c04

Please sign in to comment.