generated from IMTEK-Simulation/python-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 894 Bytes
/
publish.yml
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
name: Publish
on:
push:
branches:
- master
tags:
- '*'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Installing Python
run: |
sudo apt-get update -qy
sudo apt-get install -y \
python3-dev \
python3-pip \
python3-venv
python3 -m venv ../venv
source ../venv/bin/activate
pip install build
- name: Build package
run: |
source ../venv/bin/activate
python3 -m build . -s
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}