name: Publish VSCE/OVX on: workflow_dispatch: env: CI: 1 PRINT_GITHUB_ANNOTATIONS: 1 defaults: run: shell: bash permissions: contents: read jobs: publish: name: Publish VSCE/OVX environment: vsce publish timeout-minutes: 20 runs-on: ubuntu-latest permissions: contents: write concurrency: vscode-extension-publish steps: - name: Generate GH token id: generate_token uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.HUPPY_APP_ID }} private-key: ${{ secrets.HUPPY_APP_PRIVATE_KEY }} - name: Check out code id: checkout uses: actions/checkout@v6 with: persist-credentials: false submodules: true token: ${{ steps.generate_token.outputs.token }} - name: Configure git credentials run: git config --global url."https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/".insteadOf "https://github.com/" - uses: ./.github/actions/setup - name: Build types run: yarn build-types - name: Publish extension timeout-minutes: 10 run: yarn tsx ./internal/scripts/publish-editor-extensions.ts env: VSCE_PAT: ${{ secrets.VSCE_PAT }} OVSX_PAT: ${{ secrets.OVSX_PAT }} TLDRAW_ENV: production GH_TOKEN: ${{ steps.generate_token.outputs.token }} # Preserve the setup action for post-job cleanup when checkout already succeeded. - name: Check out Discord notify action if: failure() && steps.checkout.outcome != 'success' uses: actions/checkout@v6 with: sparse-checkout: .github/actions/discord-fail-notify - name: Notify Discord on failure if: failure() uses: ./.github/actions/discord-fail-notify with: webhook-url: ${{ secrets.DISCORD_DEPLOY_WEBHOOK_URL }}