-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 932 Bytes
/
release.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
name: Release
on:
workflow_dispatch:
release:
types:
- published
jobs:
release:
if: github.repository_owner == 'related-sciences'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/oai_utils
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install release dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build a source distribution and a wheel
run: |
python -m build
python -m twine check --strict dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: dist
- name: Publish package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1