-
Notifications
You must be signed in to change notification settings - Fork 37
43 lines (40 loc) · 1023 Bytes
/
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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: Version (format 1.2.3)
required: true
env:
POETRY_VERSION: 1.8.2
jobs:
tag:
name: Tag
runs-on: ubuntu-latest
steps:
- name: Create git tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/v${{ github.event.inputs.version }}",
sha: context.sha
})
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- name: Build
run: poetry build
- name: Publish
run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}