-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (51 loc) · 1.49 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
name: Build and release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
bump-version:
name: Release version
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
release-type: python
package-name: ViroConstrictor
token: ${{ secrets.RELEASE_TOKEN }}
extra-files: |
CITATION.cff
update-docs:
needs: bump-version
name: Update docs
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'chore(main):')"
steps:
- name: Checkout main
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Copy Changelog
uses: canastro/copy-file-action@master
with:
source: "CHANGELOG.md"
target: "docs/changelog.md"
- name: Setup Git
run: |
git config --global user.name "Github Actions"
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs-requirements.txt
- name: Publish docs
run: |
mike deploy --config-file mkdocs.yml --push --update-aliases $(git tag --sort=committerdate | tail -1 | sed 's/v//') latest