-
Notifications
You must be signed in to change notification settings - Fork 11
51 lines (41 loc) · 1.39 KB
/
release_to_test_pypi.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
46
47
48
49
50
51
---
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Publish 📦 to Test PyPI
on:
push:
branches:
- main
jobs:
deploy-to-pypi:
if: github.repository_owner == 'Argmaster'
name: Test deploy 📦
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python 3.8
uses: actions/[email protected]
with:
python-version: "3.8"
architecture: "x64"
- name: Install Poetry 📜
run: pip install poetry==1.8.4
- name: Install base dependencies 🗄️
run: poetry install --no-cache
- name: Bump Version for development 🔨 release
run: |
poetry version patch &&
version=$(poetry version | awk '{ print $2 }') &&
poetry version "$version".dev"$(date +%s)"
- name: Build distribution 📦
run: poetry build
- name: Detect Version of project
id: project-version
run: |
echo "version=$(poetry version | awk '{ print $2 }')" >> $GITHUB_OUTPUT
- name: Publish distribution 📦 to Test PyPI
# Executed always
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/