forked from LKremer/scbs
-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (36 loc) · 1.09 KB
/
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
# This workflow automatically releases the package to PyPI
# whenever a new GitHub release is created.
# So only create a new release when all tests were successful!
name: Upload package to PyPI
on:
release:
types: [published]
# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
jobs:
release:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/MethSCAn
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
with:
filter: blob:none
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip"
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package
run: |
python -m build
twine check dist/*
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1