-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.05 KB
/
release.yaml
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 Workflow
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install necessary packages for make
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Install Pipenv and build packages
run: |
python -m pip install --upgrade pip
pip install pipenv build
- name: Install project dependencies
run: pipenv install --dev
- name: Set up PyPI Token
run: echo "pypi_token=${{ secrets.PYPI_TOKEN }}" >> $GITHUB_ENV
- name: 'Determine VERSION from tag'
id: 'version'
run: |
echo "value=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Run make publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ env.pypi_token }}
VERSION: ${{ steps.version.outputs.value }}
run: make publish