-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (38 loc) · 1.13 KB
/
publish_on_release.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
name: Publish Release to PyPI
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11.3'
- name: Install poetry
uses: abatilo/[email protected]
- name: Install project dependencies
run: |
python3 -m pip install --upgrade pip
make install-extras
- name: Set package version
run: poetry version "${{ github.event.release.tag_name }}"
- name: Build the Package
run: poetry build
- name: Update Release with Built Package
uses: softprops/action-gh-release@v1
with:
tag_name: "${{ github.event.release.tag_name }}"
files: |
dist/*
- name: run tests
# Only run tests for skillsnetwork since cv studio tests not working from CI
run: poetry run pytest tests/ -k 'test_skillsnetwork.py'
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}