-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 939 Bytes
/
package.yaml
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: Package
on:
# Building on pull-requests, manual dispatch, and pushes to main; but restricting
# publishing only to main pushes and manual dispatch with `if`s in specific steps.
pull_request:
workflow_dispatch:
push:
branches:
- main
jobs:
package:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build
run: python setup.py sdist
- name: Test install
run: pip install dist/*
- name: Test import
run: python -c "import cpg_workflows"
- name: Publish the wheel to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event_name != 'pull_request' }}
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/
skip_existing: true