-
Notifications
You must be signed in to change notification settings - Fork 17
53 lines (50 loc) · 1.28 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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: publish
on:
workflow_dispatch:
pull_request:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
container:
image: condaforge/mambaforge
volumes:
- ${{ github.workspace }}:/github/workspace
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: mamba install -c conda-forge twine build pip setuptools wheel
- name: Build Library
run: python -m build --sdist --wheel
- name: Expose wheel as artifact
uses: actions/upload-artifact@master
with:
name: dist
path: dist
release:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download build artifact
uses: actions/download-artifact@master
with:
name: dist
path: dist
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/sax-0.13.0.tar.gz
dist/sax-0.13.0-py3-none-any.whl
- name: Publish to PyPI
run: |
pip install --user twine \
&& twine upload \
dist/sax-0.13.0.tar.gz \
dist/sax-0.13.0-py3-none-any.whl \
--username __token__ \
--password ${{ secrets.PYPI_TOKEN }}