Skip to content

Commit 75eb796

Browse files
authored
Add a workflow to release a new stable version (#87)
This PR adds a new GitHub Action that partially automates the process of releasing a new stable version of `syntheseus`. It tags the latest commit with an appropriate version tag and builds the docs (using a generalized version of the docs building pipeline).
1 parent 0de1ca2 commit 75eb796

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Docs
33
on:
44
push:
55
branches: [ main ]
6+
workflow_call:
7+
inputs:
8+
versions:
9+
required: true
10+
type: string
611
workflow_dispatch:
712

813
permissions:
@@ -29,4 +34,4 @@ jobs:
2934
restore-keys: |
3035
mkdocs-material-
3136
- run: pip install mkdocs-material mkdocs-jupyter mike
32-
- run: mike deploy --push --update-aliases dev
37+
- run: mike deploy --push --update-aliases ${{ inputs.versions != '' && inputs.versions || 'dev' }}

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Stable Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
required: true
8+
type: string
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
push-tag:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- run: git tag -a ${{ inputs.version }} -m "Release ${{ inputs.version }}"
18+
- run: git push origin ${{ inputs.version }}
19+
build-docs:
20+
uses: ./.github/workflows/docs.yml
21+
with:
22+
versions: ${{ inputs.version }} stable

0 commit comments

Comments
 (0)