Skip to content

fix: add runtime to docs (#46) #26

fix: add runtime to docs (#46)

fix: add runtime to docs (#46) #26

Workflow file for this run

name: Create release tag
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch tags
run: git fetch --tags
- name: Create and push tag from package.json
id: tag
run: |
VERSION=$(node -p "require('./package.json').version")
TAG="v$VERSION"
# Check if tag already exists
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists, skipping"
echo "created=false" >> $GITHUB_OUTPUT
exit 0
fi
# Create and push tag
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag "$TAG"
git push origin "$TAG"
echo "Created and pushed tag $TAG"
echo "created=true" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Trigger publish workflow
if: steps.tag.outputs.created == 'true'
uses: actions/github-script@v7
with:
script: |
await github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: context.repo.repo,
event_type: 'publish_release',
client_payload: {
version: '${{ steps.tag.outputs.version }}',
tag: '${{ steps.tag.outputs.tag }}'
}
});