diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9506d8f..d67aa0e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,3 +37,26 @@ jobs: - name: Publish to npm run: npm publish --provenance + + # Runs after npm publish; failures here do not affect the published package (re-run this job only if needed). + notify-vscode-motoko: + needs: publish + runs-on: ubuntu-latest + steps: + - name: Generate GitHub App token + id: dispatch-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.GENERIC_CI_RW_APP_ID }} + private-key: ${{ secrets.GENERIC_CI_RW_APP_PRIVATE_KEY }} + owner: caffeinelabs + repositories: | + vscode-motoko + + - name: Trigger vscode-motoko (bump motoko npm in extension) + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ steps.dispatch-token.outputs.token }} + repository: caffeinelabs/vscode-motoko + event-type: motoko-release + client-payload: '{"version":"${{ github.event.release.tag_name }}"}' diff --git a/RELEASING.md b/RELEASING.md index 9e06ca2..5b68951 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -31,6 +31,7 @@ The [`release`](.github/workflows/release.yml) workflow will automatically: - Validate the tag matches `package.json` - Build and test - Publish to npm via [OIDC trusted publishing](https://docs.npmjs.com/trusted-publishers) (no tokens needed) +- Notify [vscode-motoko](https://github.com/caffeinelabs/vscode-motoko) to open a PR bumping the `motoko` dependency (GitHub App must include the `vscode-motoko` repo; same app as `update-moc`) ## Local development (generate)