-
Notifications
You must be signed in to change notification settings - Fork 128
51 lines (45 loc) · 1.57 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
name: Publish dea-tools to PyPI
on:
push:
branches:
- develop
paths:
- 'Tools/**'
- '.github/workflows/publish.yml'
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Get history and tags for SCM versioning
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Build dea-tools
run: |
python3 -m pip install setuptools_scm build
python3 -m setuptools_scm
cd Tools
python3 -m pip install pip==22.0.4
python3 -m pip install --use-feature=in-tree-build --no-deps .
python3 -c "import dea_tools; print(dea_tools.__version__)"
python3 -m build
- name: pypi-publish
# You may pin to the exact commit or the version.
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
# PyPI access token
password: ${{ secrets.PYPI_API_TOKEN }}
# The target directory for distribution
packages_dir: Tools/dist
# Check metadata before uploading
verify_metadata: true
# Do not fail if a Python package distribution exists in the target package index
skip_existing: false
# Show verbose output.
verbose: true