diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0e47cb0..a49980c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,10 +59,46 @@ jobs: NPM_PACKAGE_ROOT: "npm" SKIP_DOCKER_PUBLISH: true + docs: + name: Update documentation + needs: + - release + + runs-on: ubuntu-latest + + steps: + - name: "Generate token" + id: generate_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.OS_GITHUB_APP_ID }} + private_key: ${{ secrets.OS_GITHUB_APP_PRIVATE_KEY }} + + - name: "☁️ checkout repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ steps.generate_token.outputs.token }} + + - name: "🐹 Setup Go" + uses: actions/setup-go@v5 + with: + go-version: 1.22.x + + - name: "🤲 Setup Just" + uses: extractions/setup-just@v2 + + - name: "📗 Generate Documentation" + run: ./scripts/generate-docs.sh + env: + GITHUB_REF: ${{ github.ref }} + GH_TOKEN: ${{ steps.generate_token.outputs.token }} + build: name: Build and publish artifacts needs: - release + - docs if: needs.release.outputs.release-tag != '' runs-on: ubuntu-latest permissions: @@ -85,11 +121,6 @@ jobs: - name: "🤲 Setup Just" uses: extractions/setup-just@v2 - - name: "📗 Generate Documentation" - run: ./scripts/generate-docs.sh - env: - GITHUB_REF: ${{ github.ref }} - - name: "🔧 Build all and upload artifacts to release" env: GH_TOKEN: ${{ github.token }}