-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (60 loc) · 2.15 KB
/
python-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Bump version workflow
on:
push:
branches:
- master
- ci
# - main
jobs:
bump-version:
name: Bump package version
if: "!contains(github.event.head_commit.message, 'Bump version')"
runs-on: ubuntu-20.04
steps:
- name: actions/checkout
uses: actions/checkout@v2
# with:
# persist-credentials: false
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build bump2version
- name: Bump version
run: |
git config --global user.email "vladimir.savchenko+oda-release-bot@gmail.com"
git config --global user.name "ODA Release Bot"
bump2version patch --verbose --commit --tag
bump2version release --verbose --commit --tag
git push --tags
- uses: stefanzweifel/git-auto-commit-action@v4
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
verify_metadata: false
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Conda publish
# You may pin to the exact commit or the version.
# uses: silvxlabs/conda-skeleton-publish@5a89b70689c690cd83b7475fb6a1a0f332fa0ccf
uses: silvxlabs/conda-skeleton-publish@v2
with:
# Name of PyPI package
pypi_package: oda-api # optional
# Package version on PyPi
#package_version: # optional, default is latest
# Python version to build
#python_version: # optional
# Conda channels to use for building package
build_channels: conda-forge
# Conda channel to upload to
upload_channel: mmoda# optional
# Anaconda client access token
access_token: ${{ secrets.CONDA_ACCESS_TOKEN }}
# Platforms to publish
#platforms: # optional, default is win-64 osx-64 osx-arm64 linux-64 linux-aarch64
# Set this to true if this is a stable release. Passese a `-l beta` arg if false.
#stable: # optional
# If true, waits for the PyPi package to become available.
wait: true # optional