-
Notifications
You must be signed in to change notification settings - Fork 18
46 lines (44 loc) · 1.13 KB
/
publish.yml
File metadata and controls
46 lines (44 loc) · 1.13 KB
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
name: Publish
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.3.1
- name: Build
run: |
poetry install
poetry build
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: umapi-client ${{ github.ref }}
body_path: .changelog/latest.md
draft: false
prerelease: false
- id: get_version
uses: battila7/get-version-action@v2
- name: Upload release assets
uses: AButler/upload-release-assets@v2.0
with:
files: dist/*
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ steps.get_version.outputs.version }}
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish