-
Notifications
You must be signed in to change notification settings - Fork 104
48 lines (40 loc) · 1.08 KB
/
release.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
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run image
uses: abatilo/actions-poetry@v4.0.0
with:
poetry-version: '1.8.4'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel twine
- name: Install
run: make install
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.RELEASE_VERSION }}
generateReleaseNotes: true
prerelease: false
allowUpdates: true
- name: Build and publish package
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
poetry publish --build