-
Notifications
You must be signed in to change notification settings - Fork 8
124 lines (101 loc) · 3.21 KB
/
release.yml
File metadata and controls
124 lines (101 loc) · 3.21 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Publish package on main branch if it's tagged with 'v*'
name: release & publish workflow
# Controls when the action will run.
on:
# Triggers the workflow on push events but only for the master branch
push:
tags:
- 'v*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "release"
release:
name: Create Release
runs-on: ubuntu-20.04
strategy:
matrix:
python-versions: [3.8]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-versions }}
- name: Install libxmlsec
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y libxmlsec1 libxmlsec1-dev
- name: Install dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y libxmlsec1 libxmlsec1-dev
- name: Build wheels and source tarball
run: >-
poetry build
# - name: create github release
# id: create_release
# uses: softprops/action-gh-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# body: ${{ steps.changelog_reader.outputs.changes }}
# files: dist/*.whl
# draft: false
# prerelease: false
- name: publish to PyPI
uses: ./.github/actions/gh-action-pypi-publish/
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
documentation:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install libxmlsec
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y libxmlsec1 libxmlsec1-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: build documentation
run: |
poetry install -E doc
poetry run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: './site/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1