-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (64 loc) · 2.14 KB
/
publish-pypi.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
69
70
71
72
73
74
75
76
name: Publish to PyPI
on:
workflow_dispatch:
inputs:
version:
description: "Version to tag"
required: true
jobs:
tag:
uses: singnet/das/.github/workflows/run-semver.yml@master
with:
version: ${{ github.event.inputs.version }}
version-strategy: bump-version-from-variable-value
job-image-namespace: trueagi
job-image-version-semver: semantic-versioning
main-branch: master
version-tag-regex-pattern: /^\d+\.\d+\.\d+$/
version-require-confirmation: "true"
title: New version of hyperon-das-atomdb
deliverable: Library in PyPI named hyperon-das-atomdb
secrets: inherit
# publish:
# needs: tag
# environment: prod
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: ~3.10
# - name: Install Poetry
# run: |
# pip install poetry
# poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
# - name: Build and Publishing library version in PyPI
# run: |
# poetry version ${{ github.event.inputs.version }}
# poetry build
# poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
publish-cpp:
needs: tag
environment: prod-cpp
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ~3.10
- name: Install requirements
run: |-
pip install twine
- name: Update version
working-directory: hyperon_das_atomdb_cpp
run: sed -i 's/^version = ".*"/version = "${{ github.event.inputs.version }}"/' pyproject.toml
- name: Build Wheels
working-directory: hyperon_das_atomdb_cpp
run: make wheels
- name: Publish Packages
working-directory: hyperon_das_atomdb_cpp/dist
run: twine upload *.whl --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} --non-interactive