Refine Diagnostic Filters and adds human-readable diagnostic names #5206
Workflow file for this run
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: build | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
env: | |
#hardcode the coveralls token...it's not overly important to protect, and github actions won't allow forks to work with coveralls otherwise | |
COVERALLS_REPO_TOKEN: "kVPcGJfehOArEQnHb8BT3KS72xbUQCoxI" | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "14.18.1" | |
architecture: 'x64' # fix for macos-latest | |
- run: npm ci | |
- run: npm run build | |
- run: npm run lint | |
- run: npm run test | |
- run: npm run publish-coverage | |
# this is stalling out for some reason, so disable it for now | |
#- run: npm run test-related-projects | |
npm-release: | |
#only run this task if a tag starting with 'v' was used to trigger this (i.e. a tagged release) | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: ci | |
runs-on: ubuntu-latest | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "14.18.1" | |
architecture: 'x64' # fix for macos-latest | |
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc | |
- run: npm ci | |
- run: npm run build | |
#create npm package | |
- run: npm pack | |
#create GitHub release | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false #contains(github.ref, '-beta.') == true | |
#upload package to GitHub release | |
- name: Upload GitHub Release Assets | |
uses: alexellis/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
asset_paths: '["./*.tgz"]' | |
#If there's a dash followed by an alpha character, this is a prerelease and should be tagged "next". Otherwise tag as "latest" | |
- run: if [[ "${{ github.ref }}" =~ -[a-zA-Z] ]]; then echo "DIST_TAG=next" >> $GITHUB_ENV; else echo "DIST_TAG=latest" >> $GITHUB_ENV; fi | |
#upload to npm | |
- run: npm publish --tag ${{env.DIST_TAG}} |