-
Notifications
You must be signed in to change notification settings - Fork 12
69 lines (54 loc) · 2 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Release
on:
push:
branches: ["main"]
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 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build tests
run: npm run test:build
- name: Build Playlet
run: npm run build:release:ci
- name: Use Java 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- 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 ./release/playlet-lib.zip
- 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
- name: Create Canary release
run: gh release create canary ./release/playlet.zip ./release/playlet-lib.zip --notes-file docs/canary-changelog.md --prerelease --title Canary
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}