Skip to content

setup user name and email #11

setup user name and email

setup user name and email #11

name: Update Docs Version
on:
repository_dispatch:
types: [update-version]
push:
branches:
- fix_dispatch_trigger
jobs:
update-docs-version:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v3
- name: Extract tag name
run: echo "TAG_NAME=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
- name: Set TAG_NAME environment variable
run: echo "TAG_NAME=v1.1.3" >> $GITHUB_ENV
- name: Update docs to new version
run: |
TAG_NAME="$(echo "${TAG_NAME}" | sed 's/^v//')"
# Update docs to use the new version
sed -i -E "s/v\.?[0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9\-]*/v${TAG_NAME}/g" \
docs/advanced/quickstart-split.md \
docs/advanced/test-command.md \
docs/advanced/quickstart-combine.md \
docs/charon/charon-cli-reference.md \
docs/faq/errors.mdx \
docs/start/quickstart_group.mdx \
docs/start/quickstart_alone.mdx
#install dependencies
yarn
# Update version with yarn
yarn run version v${TAG_NAME}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: main
head: update-version-${{ env.TAG_NAME }}
title: "Update docs to use version v${ env.TAG_NAME}"
body: "Automatically generated PR to update documentation for version v${TAG_NAME}"
commit-message: "Update docs to use version v${ env.TAG_NAME}"
author-name: "obol-platform"
author-email: "[email protected]"