Skip to content

Commit ec989e6

Browse files
committed
Create initial release workflow
1 parent a033de4 commit ec989e6

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build-n-publish:
10+
name: Build and publish Python 🐍 distributions 📦 to PyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: '3.10'
18+
- name: Install pypa/setuptools
19+
run: >-
20+
python -m
21+
pip install wheel
22+
- name: Extract tag name
23+
id: tag
24+
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
25+
- name: Update version in setup.py
26+
run: >-
27+
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
28+
- name: Build a binary wheel
29+
run: >-
30+
python setup.py sdist bdist_wheel
31+
- name: Publish distribution 📦 to PyPI
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
setup(
88
name="mlflow-plugin-proxy-auth",
9+
version='{{VERSION_PLACEHOLDER}}',
910
author="Matúš Námešný",
1011
author_email="matus@namesny.com",
1112
description="Provides authentication to Mlflow server using Proxy-Authorization header.",

0 commit comments

Comments
 (0)