Loki performance components #31
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: Node.js CI | |
# This workflow will attempt to build static resources with NPM for any commit to main, or PR'ed to main. | |
# Additionally, for any tags pushed (that start with 'v' indicating a version), a release will be created | |
# including the static resources. This release will be created as a draft so that more detailed notes can | |
# be added before marking it as a proper release. If a draft release already exists matching the tag name, | |
# the existing artifacts will be overridden, but the release body will remain. If the existing release is | |
# not a draft, nothing will be overridden. | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Reconfigure git to use HTTP authentication | |
run: > | |
GIT_TRACE=1 git config --global url."https://github.com/".insteadOf ssh://[email protected]/ | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
timeout-minutes: 2 | |
- run: npm run build --if-present | |
timeout-minutes: 10 | |
#- run: npm test temporarily remove; I think it's failing due to axios module import in odin-react | |
- name: Create zip archive | |
run: | | |
cd build | |
zip -r build.zip . | |
- name: List contents of zip | |
run: unzip -l build/build.zip | |
- name: Create release if tagged | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: ncipollo/release-action@v1 | |
with: | |
artifactErrorsFailBuild: true | |
artifacts: build/build.zip | |
# Create as a draft so that it can be vetted and notes added | |
draft: true | |
generateReleaseNotes: true | |
skipIfReleaseExists: true | |
# Update an existing release, but only if it's draft or prerelease. If notes already exist, leave them. | |
allowUpdates: true | |
updateOnlyUnreleased: true | |
omitBodyDuringUpdate: true |