-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (79 loc) · 2.19 KB
/
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
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
94
95
96
97
98
99
100
101
name: release
on:
push:
tags:
- v*
concurrency:
group: release
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
publish-pypi:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Hatch
run: pip install --upgrade hatch
- name: Build package
run: hatch build
- name: Push Python artifacts to PyPI
uses: pypa/[email protected]
with:
skip-existing: true
publish-docs:
needs: publish-pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Hatch
run: pip install --upgrade hatch
- name: Get version from tag
id: get-version
uses: battila7/get-version-action@v2
- name: Deploy documentation
run: |
git fetch origin gh-pages --depth=1
git config user.name github-actions
git config user.email [email protected]
hatch run docs:deploy ${{ steps.get-version.outputs.version-without-v }}
git push origin gh-pages
publish-github:
needs: publish-docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get version from tag
id: get-version
uses: battila7/get-version-action@v2
- name: Get changelog release info
id: changelog
uses: release-flow/keep-a-changelog-action@v2
with:
command: query
version: ${{ steps.get-version.outputs.version-without-v }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: EOLib ${{ steps.get-version.outputs.version }}
body: ${{ steps.changelog.outputs.release-notes }}