-
-
Notifications
You must be signed in to change notification settings - Fork 149
46 lines (43 loc) · 1.22 KB
/
release-and-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
name: Semantic Release and PyPI Publish
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }} # Use the new token for authentication
- name: Python Semantic Release
id: semantic_release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.ADMIN_TOKEN }} # Use the new token for authentication
git_committer_name: "OpenAdapt Bot"
git_committer_email: "bot@openadapt.ai"
publish:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: main
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
pip install poetry
poetry install
poetry config pypi-token.pypi $PYPI_TOKEN
poetry build
poetry publish --no-interaction --skip-existing