-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (43 loc) · 1.34 KB
/
Copy pathrelease.yml
File metadata and controls
45 lines (43 loc) · 1.34 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
name: release
on:
create:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get release tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry.py
python get-poetry.py --version 1.0.2 -y
$HOME/.poetry/bin/poetry install
rm get-poetry.py
- name: Poetry - Set Version & Build
run: |
$HOME/.poetry/bin/poetry version ${{ steps.get_version.outputs.VERSION }}
$HOME/.poetry/bin/poetry build
- name: Push to PyPI
run: |
$HOME/.poetry/bin/poetry publish --build --username "${{ secrets.PYPI_USERNAME }}" --password "${{ secrets.PYPI_PASSWORD }}" --no-interaction
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Release ${{ github.ref }}
draft: false
prerelease: false