Update Dependencies (#383) #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
- '[0-9]+.x' | |
- '[0-9]+.[0-9]+.x' | |
concurrency: release | |
env: | |
FORCE_COLOR: 3 | |
permissions: | |
contents: read | |
jobs: | |
release: | |
name: Release | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
if: github.triggering_actor != 'dependabot[bot]' | |
steps: | |
- name: Checkout | |
uses: Brightspace/third-party-actions@actions/checkout | |
with: | |
persist-credentials: false | |
- name: Set up node | |
uses: Brightspace/third-party-actions@actions/setup-node | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: Release | |
id: release | |
uses: BrightspaceUI/actions/semantic-release@main | |
with: | |
GITHUB_TOKEN: ${{secrets.D2L_RELEASE_TOKEN}} | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
NPM: true | |
- name: Trigger downstream updates | |
uses: Brightspace/third-party-actions@actions/github-script | |
if: github.ref == 'refs/heads/main' && steps.release.outputs.VERSION != '' | |
with: | |
github-token: ${{secrets.REPOSITORY_DISPATCH_TOKEN}} | |
script: | | |
const targets = [ | |
'test-reporting-action', | |
'test-actions' | |
]; | |
const results = await Promise.allSettled(targets.map(target => | |
github.rest.repos.createDispatchEvent({ | |
owner: 'Brightspace', | |
repo: target, | |
event_type: 'test-reporting-node-release', | |
}) | |
)); | |
console.log(results); | |
if (results.some(r => r.status === 'rejected')) { | |
throw new Error('Not all dispatches succeeded. See details above.'); | |
} |