Skip to content

Commit 34a47f0

Browse files
authored
dist: Rework release-packager workflow for releases
1 parent 712fc6f commit 34a47f0

File tree

2 files changed

+47
-31
lines changed

2 files changed

+47
-31
lines changed

.github/workflows/dist.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Distribution
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
11+
jobs:
12+
tagged-release:
13+
name: Tagged Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install Poetry
22+
uses: abatilo/actions-poetry@v2.1.0
23+
with:
24+
poetry-version: '1.1.6'
25+
- name: Configure poetry
26+
run: poetry config virtualenvs.in-project true
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
poetry install
31+
- name: Build a wheel
32+
run: poetry build -f wheel
33+
- name: Get version from pyproject
34+
run: echo "::set-output name=version::$(poetry version | cut -d ' ' -f 2)"
35+
id: ver
36+
- name: Upload wheel
37+
uses: actions/upload-artifact@v2.2.4
38+
with:
39+
name: Python Wheel
40+
path: "dist/*.whl"
41+
- name: Deploy release
42+
uses: marvinpinto/action-automatic-releases@latest
43+
with:
44+
prerelease: false
45+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
46+
files: |
47+
dist/*.whl

.github/workflows/release-packager.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)