Skip to content

Commit

Permalink
fix(workflows/release): trigger deployment after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Jan 15, 2025
1 parent 86490f2 commit 5c49dca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,40 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org/"
cache: npm

- run: npm ci

- run: npm test
env:
FORCE_COLOR: 3

- run: npm run build

- run: npm publish build/ --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Add JSON as a release asset
run: gh release upload ${GITHUB_REF#refs/*/} build/data.json

# - name: Publish stats for all data (#3555)
# run: npm run --silent stats | gh issue comment https://github.com/mdn/browser-compat-data/issues/3555 --body-file -

- name: Trigger BCD deployment
uses: actions/github-script@v7
with:
github-token: ${{ secrets.DISPATCH_PAT }}
script: |
const result = await github.rest.repos.createDispatchEvent({
owner: 'mdn',
repo: 'bcd-utils',
event_type: 'bcd_release',
client_payload: {}
})
console.log(result);
25 changes: 0 additions & 25 deletions .github/workflows/update_bcd-utils_api.yml

This file was deleted.

0 comments on commit 5c49dca

Please sign in to comment.