Skip to content

lint

lint #746

Workflow file for this run

name: Release
on:
push:
branches: ["main"]
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
env:
ROKU_DEV_TARGET: ${{ secrets.ROKU_DEV_TARGET }}
ROKU_DEV_TARGET_PORT: ${{ secrets.ROKU_DEV_TARGET_PORT }}
ROKU_DEVPASSWORD: ${{ secrets.ROKU_DEVPASSWORD }}
ROKU_DEV_TARGET_TELNET_PORT: ${{ secrets.ROKU_DEV_TARGET_TELNET_PORT }}
- name: Build Playlet for release
run: npm run build:release
env:
ROKU_DEV_TARGET: ${{ secrets.ROKU_DEV_TARGET }}
ROKU_DEV_TARGET_PORT: ${{ secrets.ROKU_DEV_TARGET_PORT }}
ROKU_DEVPASSWORD: ${{ secrets.ROKU_DEVPASSWORD }}
ROKU_SIGN_PASSWORD: ${{ secrets.ROKU_SIGN_PASSWORD }}
- name: Use Java 21
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
- 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
run: ./sca-cmd/bin/sca-cmd ./release/playlet-lib.zip --exit error
- name: Run Analysis on Playlet App
run: ./sca-cmd/bin/sca-cmd ./release/playlet.zip --exit error
- name: Delete Canary release
uses: dev-drprasad/[email protected]
with:
tag_name: canary
github_token: ${{ secrets.GH_TOKEN }}
- name: Extract changelog
run: |
latest_release=$(awk 'BEGIN { RS="## \\[" } NR==2 { print "## ["$0 }' CHANGELOG.md)
echo -e "\n$latest_release" >> docs/canary-changelog.md
# A bug in gh cli causes the release to be created as a draft, and not released.
# See https://github.com/cli/cli/issues/8458
- name: Wait 10 seconds
run: sleep 10
- name: Create Canary release
run: gh release create canary ./release/playlet.zip ./release/playlet.squashfs.pkg ./release/playlet-lib.zip ./release/playlet-lib.squashfs.pkg --notes-file docs/canary-changelog.md --prerelease --title Canary
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}