-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.07 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
49
50
51
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
job_release:
name: Create Release and Upload to PyPI
runs-on: ubuntu-latest
steps:
- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install setuptools
run: |
python -m pip install --upgrade setuptools
- name: Build
id: build
run: |
python setup.py build sdist bdist_wheel
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.tag.outputs.tag }}
prerelease: false
draft: true
files: |
dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true