-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (36 loc) · 978 Bytes
/
release-cd.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
name: CD - Package Publishing
on:
release:
types:
- published
permissions:
contents: read
packages: write
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
PyPi-Package-Release:
if: github.repository == 'Anselmoo/spectrafit'
name: Publish on PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@e1dad8a51d599265993e342ee807cac176eb71d4
with:
user: __token__
password: ${{ secrets.TWINE_TOKEN }}
continue-on-error: true