From 75eb796f771b9eafc2a683ebd2559937867ed887 Mon Sep 17 00:00:00 2001 From: Krzysztof Maziarz Date: Wed, 10 Apr 2024 16:20:36 +0100 Subject: [PATCH] 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). --- .github/workflows/docs.yml | 7 ++++++- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5fb51436..e95066b2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,6 +3,11 @@ name: Docs on: push: branches: [ main ] + workflow_call: + inputs: + versions: + required: true + type: string workflow_dispatch: permissions: @@ -29,4 +34,4 @@ jobs: restore-keys: | mkdocs-material- - run: pip install mkdocs-material mkdocs-jupyter mike - - run: mike deploy --push --update-aliases dev + - run: mike deploy --push --update-aliases ${{ inputs.versions != '' && inputs.versions || 'dev' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..a1bdc5aa --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release Stable Version + +on: + workflow_dispatch: + inputs: + version: + required: true + type: string + +permissions: + contents: write + +jobs: + push-tag: + runs-on: ubuntu-latest + steps: + - run: git tag -a ${{ inputs.version }} -m "Release ${{ inputs.version }}" + - run: git push origin ${{ inputs.version }} + build-docs: + uses: ./.github/workflows/docs.yml + with: + versions: ${{ inputs.version }} stable