-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (38 loc) · 1.13 KB
/
test-python-publish.yml
File metadata and controls
47 lines (38 loc) · 1.13 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
46
47
name: Upload Python Package (TEST)
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Extract version from tag
id: extractversion
shell: bash
run: echo "VERSION=$(echo ${{github.ref_name}} | cut -d "v" -f 2)" >> $GITHUB_OUTPUT
- name: Update module version with tag
shell: bash
run: |
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.extractversion.outputs.VERSION }}/g" src/andersen_ev/__init__.py
git diff
cat src/andersen_ev/__init__.py
- name: Build package
run: python -m build
- name: Publish package to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.STROBEJB_PYPI_PUBLISH_TEST }}