Skip to content

feat: add metrics formationMonitor routes and types (W-23388930) (#131) #45

feat: add metrics formationMonitor routes and types (W-23388930) (#131)

feat: add metrics formationMonitor routes and types (W-23388930) (#131) #45

Workflow file for this run

name: Release
on:
push:
branches:
- main
- beta
jobs:
release-please:
runs-on: pub-hk-ubuntu-24.04-ip
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
pr_number: ${{ steps.release.outputs.pr_number }}
config_file: ${{ steps.release.outputs.config_file }}
manifest_file: ${{ steps.release.outputs.manifest_file }}
npm_tag: ${{ steps.release.outputs.npm_tag }}
package_name: ${{ steps.release.outputs.package_name }}
no_release_needed: ${{ steps.release.outputs.no_release_needed }}
pr_already_exists: ${{ steps.release.outputs.pr_already_exists }}
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@v7
- name: Checkout workflows repository
uses: actions/checkout@v7
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main
- name: Run release-please
id: release
uses: ./workflows-repo/.github/actions/release-please-pr-public
with:
package-manager: npm
branch_name: ${{ github.ref_name }}
token: ${{ steps.app-token.outputs.token }}
validate:
needs: release-please
if: |
needs.release-please.outputs.release_created != 'true' &&
(needs.release-please.outputs.pr_number != '' || needs.release-please.outputs.pr_already_exists == 'true')
runs-on: pub-hk-ubuntu-24.04-ip
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@v7
- name: Checkout workflows repository
uses: actions/checkout@v7
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main
- name: Validate and test
uses: ./workflows-repo/.github/actions/release-validate-public
with:
package-manager: npm
lint_command: ''
test_command: 'test -- src tests'
publish:
needs: [release-please, validate]
if: |
needs.release-please.outputs.release_created != 'true' &&
needs.validate.result == 'success' &&
(needs.release-please.outputs.pr_number != '' || needs.release-please.outputs.pr_already_exists == 'true')
runs-on: pub-hk-ubuntu-24.04-ip
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@v7
- name: Checkout workflows repository
uses: actions/checkout@v7
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main
- name: Publish to npm
uses: ./workflows-repo/.github/actions/release-publish-public
with:
package-manager: npm
workflows_token: ${{ steps.app-token.outputs.token }}
build_command: ''
npm_tag: ${{ needs.release-please.outputs.npm_tag }}
package_name: ${{ needs.release-please.outputs.package_name }}
pr_number: ${{ needs.release-please.outputs.pr_number }}
branch_name: ${{ github.ref_name }}
- name: Merge release PR
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
gh pr merge ${{ needs.release-please.outputs.pr_number }} \
--squash --auto --delete-branch