-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (85 loc) · 2.17 KB
/
release.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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Release
on:
push:
branches:
- main
- dev
env:
PROJECT_NAME : Github-Search-Engine
jobs:
release:
name: Release pushed tag
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "^3.11.0"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Package build
run: |
poetry build
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: dist
path: ./dist
deploy:
runs-on: ubuntu-latest
needs:
- release
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/${{ env.PROJECT_NAME }}
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: dist
path: ./dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
trigger-docs:
runs-on: ubuntu-latest
needs:
- release
permissions:
actions: write
steps:
- name: Invoke Documentation Workflow
uses: benc-uk/[email protected]
with:
workflow: Build And Release Docs
trigger-rebase:
runs-on: ubuntu-latest
needs:
- release
permissions:
actions: write
steps:
- name: Invoke rebase Workflow
if: ${{ github.ref == 'refs/heads/main' }}
uses: benc-uk/[email protected]
with:
workflow: Automatic Rebase