chore(release): 1.3.0 #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation Version Release | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version of documentation to generate and release, x.y.z' | |
required: true | |
jobs: | |
docs-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.DOCUMENTATION_UPDATE_TOKEN }} | |
- name: Set Version ➕ | |
run: | | |
if [ -z ${{ github.event.inputs.version }} ]; then echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV; else echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV; fi | |
- name: Release 🌱 | |
run: | | |
VERSION=${RELEASE_VERSION#"v"} | |
echo $VERSION to be released... | |
cd docs | |
cp -r release/latest/ release/${VERSION} | |
if [[ $VERSION =~ ^[[:digit:]]\.[[:digit:]]\.[[:digit:]]$ ]]; then cp -r release/latest/* release/stable; else echo "Not marking version as stable"; fi | |
if grep -Fq "$VERSION" _data/versions.yaml; then echo "version: ${VERSION} already exists in versions.yaml"; else echo "version: ${VERSION} does not exist in versions.yaml and will be added" && echo -e "\n- name: ${VERSION}\n root: ${VERSION}" >> _data/versions.yaml; fi | |
git status | |
- name: Commit & Push changes | |
uses: actions-js/push@master | |
with: | |
github_token: ${{ secrets.DOCUMENTATION_UPDATE_TOKEN }} | |
branch: main |