-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 946 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Publish to PyPI
on:
push:
tags:
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Code Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build and Publish to PyPI
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PIPY_API_TOKEN }}
poetry_version: "==1.8.2"
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: ./dist/*
make_latest: true
body: |
This is a release for the version ${{ github.ref_name }}.
PyPI package: https://pypi.org/project/${{ github.event.repository.name }}/${{ github.ref_name }}