diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5c3d341..4960c37f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,24 @@ jobs: - name: Build Playlet run: npm run build:release:ci + - name: Use Java + uses: actions/setup-java@v3 + + - name: Download the Static Channel Analysis CLI + run: | + curl -sSL "https://devtools.web.roku.com/static-channel-analysis/sca-cmd.zip" -o sca-cmd.zip + unzip sca-cmd.zip + + - name: Run Analysis on Playlet Lib + # Note: we don't set the exit code to on error, because sca treats the lib + # as a standalone app, and logs all sorts of errors that are not relevant to + # a Component Library. + # This run is simply to check if there's any interesting output comes up. + run: ./sca-cmd/bin/sca-cmd ./playlet/src/lib/playlet-lib.zip + + - name: Run Analysis on Playlet App + run: ./sca-cmd/bin/sca-cmd ./release/playlet.zip --exit error + - name: Delete unstable release uses: dev-drprasad/delete-tag-and-release@v1.0 with: diff --git a/docs/README.md b/docs/README.md index 97effff2..be09a585 100644 --- a/docs/README.md +++ b/docs/README.md @@ -315,7 +315,8 @@ This will remove the custom lib, and revert to using default (latest release fro On pull requests, a Github action will run `lint:fix` and `format:fix` and push changes to the PR branch, to keep things tidy. -When merged to main branch, a Github action will build Playlet, and release a new version tagged `unstable`, with the build artifacts attached, and changelog included. +When merged to main branch, a Github action will build Playlet, run static analysis using Roku's [Static Channel Analysis tool](https://devtools.web.roku.com/#static-channel-analysis-tool), and release a new version tagged `unstable`, with the build artifacts attached, and changelog included. + Existing `unstable` release will be removed before creating a new one. This makes [Releasing](./RELEASING.md) simpler.