Skip to content

chore: generate documentation with sourcedocs #1

chore: generate documentation with sourcedocs

chore: generate documentation with sourcedocs #1

Workflow file for this run

name: Regen
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * 1' # At 05:00 on Monday.
permissions:
contents: write
pull-requests: write
jobs:
regen:
name: Regen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BELLA_ACTION_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: bahmutov/npm-install@v1
- name: Install Swift
uses: sersoft-gmbh/swifty-linux-action
with:
release-version: 5.5
- name: Build SourceDocs
run: |
git clone [email protected]:stigi/SourceDocs.git --branch xcode16 /tmp/sourcedocs
pushd /tmp/sourcedocs
make
popd
- name: Regen `magicbell-java-client`
run: yarn codegen
env:
LIBLAB_TOKEN: ${{ secrets.LIBLAB_ACTION_TOKEN }}
- name: Generate Changeset
shell: bash
run: |
TIMESTAMP=$(date +%s)
mkdir -p .changeset
PACKAGE_NAME=$(jq -r '.name' package.json)
FILE_NAME=".changeset/auto-bump-${PACKAGE_NAME}-${TIMESTAMP}.md"
if [ -z "$PACKAGE_NAME" ] || [ "$PACKAGE_NAME" == "null" ]; then
echo "Warning: Could not find 'name' in package.json. Skipping..."
continue
fi
# Create the Changeset file with the correct package name and minor bump
{
echo "---"
echo ""\"$PACKAGE_NAME\"": minor"
echo "---"
echo ""
echo "Automatic minor version bump for changes in \`$PACKAGE_NAME\`."
} > "$FILE_NAME"
echo "Created Changeset: $FILE_NAME"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.BELLA_ACTION_TOKEN }}
branch: 'feature/regen-sdks'
base: 'main'
title: 'chore: regen sdk'
body: 'Automated PR to update the generated SDK'
commit-message: 'chore: regen sdk'
committer: 'MagicBella <${{ secrets.BELLA_EMAIL_ADDRESS }}>'
author: 'MagicBella <${{ secrets.BELLA_EMAIL_ADDRESS }}>'