roku-debug 0.21.28 → 0.21.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,35 @@
1
+ name: Delete Release
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ version:
7
+ type: string
8
+ description: "The version to delete"
9
+ required: true
10
+
11
+ jobs:
12
+ delete-release:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout .github repo
16
+ uses: actions/checkout@master
17
+ with:
18
+ repository: rokucommunity/workflows
19
+
20
+ - name: Setup node
21
+ uses: actions/setup-node@master
22
+ with:
23
+ node-version: "16.20.2"
24
+
25
+ - name: Run npm ci
26
+ run: npm ci
27
+
28
+ - name: Delete release
29
+ env:
30
+ GH_TOKEN: ${{ github.token }}
31
+ run: |
32
+ npx ts-node src/cli.ts \
33
+ delete-release \
34
+ --projectName "${{ github.repository }}" \
35
+ --releaseVersion ${{ inputs.version }}
@@ -0,0 +1,63 @@
1
+ name: Initialize Release
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ branch:
7
+ type: string
8
+ description: "The branch to create the release from"
9
+ default: "master"
10
+ required: true
11
+ releaseType:
12
+ type: string
13
+ description: "The type of release: major, minor, or patch"
14
+ required: true
15
+ installDependencies:
16
+ type: string
17
+ description: "Update dependencies"
18
+ required: true
19
+ default: 'true'
20
+
21
+ jobs:
22
+ initialize-release:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Checkout .github repo
26
+ uses: actions/checkout@master
27
+ with:
28
+ repository: rokucommunity/workflows
29
+
30
+ - name: Setup node
31
+ uses: actions/setup-node@master
32
+ with:
33
+ node-version: '16.20.2'
34
+
35
+ - name: Run npm ci
36
+ run: npm ci
37
+
38
+ - name: get RokuCommunity bot token #so the bot's name shows up on all our actions
39
+ uses: tibdex/github-app-token@v1
40
+ id: generate-token
41
+ with:
42
+ app_id: ${{ secrets.BOT_APP_ID }}
43
+ private_key: ${{ secrets.BOT_PRIVATE_KEY }}`
44
+
45
+ - name: Set RUNNER_DEBUG env variable
46
+ run: |
47
+ if [[ "$RUNNER_DEBUG" == "1" ]]; then
48
+ echo "RUNNER_DEBUG=true" >> $GITHUB_ENV
49
+ else
50
+ echo "RUNNER_DEBUG=false" >> $GITHUB_ENV
51
+ fi
52
+
53
+ - name: Create release
54
+ env:
55
+ GH_TOKEN: ${{ steps.generate-token.outputs.token }}
56
+ DEBUG_LOGGING: ${{ env.RUNNER_DEBUG }}
57
+ run: |
58
+ npx ts-node src/cli.ts \
59
+ initialize-release \
60
+ --projectName "${{ github.repository }}" \
61
+ --releaseType "${{ inputs.releaseType }}" \
62
+ --branch "${{ inputs.branch }}" \
63
+ --installDependencies "${{ inputs.installDependencies == 'true' }}"
@@ -0,0 +1,71 @@
1
+ name: Make Release Artifacts
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ branch:
7
+ type: string
8
+ description: "The branch to create the release from"
9
+ required: true
10
+ node-version:
11
+ type: string
12
+ description: "The node version to use"
13
+ required: true
14
+ artifact-paths:
15
+ type: string
16
+ description: "The glob patters to find the release artifacts"
17
+ required: true
18
+
19
+ jobs:
20
+ create-release-artifacts:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Checkout caller repo
24
+ uses: actions/checkout@master
25
+ with:
26
+ ref: ${{ inputs.branch }}
27
+
28
+ - name: Checkout .github repo
29
+ uses: actions/checkout@master
30
+ with:
31
+ repository: rokucommunity/workflows
32
+ path: nested-ci
33
+
34
+ - name: Setup node
35
+ uses: actions/setup-node@master
36
+ with:
37
+ node-version: ${{ inputs.node-version }}
38
+
39
+ - name: run npm ci
40
+ run: npm ci
41
+
42
+ - name: Run package
43
+ run: npm run package;
44
+
45
+ - name: Setup node
46
+ uses: actions/setup-node@master
47
+ with:
48
+ node-version: "16.20.2"
49
+
50
+ - name: CD into nested-ci, run npm ci
51
+ run: |
52
+ cd nested-ci
53
+ npm ci
54
+
55
+ - name: Set RUNNER_DEBUG env variable
56
+ run: |
57
+ if [[ "$RUNNER_DEBUG" == "1" ]]; then
58
+ echo "RUNNER_DEBUG=true" >> $GITHUB_ENV
59
+ else
60
+ echo "RUNNER_DEBUG=false" >> $GITHUB_ENV
61
+ fi
62
+
63
+ - name: Run upload
64
+ env:
65
+ GH_TOKEN: ${{ github.token }}
66
+ run: |
67
+ npx ts-node nested-ci/src/cli.ts \
68
+ make-release-artifacts \
69
+ --branch "${{ inputs.branch }}" \
70
+ --projectName "${{ github.repository }}" \
71
+ --artifactPaths ${{ inputs.artifact-paths }}
@@ -0,0 +1,50 @@
1
+ name: Publish Release
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ ref:
7
+ type: string
8
+ description: "The merge commit created when the pull request is merged"
9
+ required: true
10
+ release-type:
11
+ type: string
12
+ description: "The type of release. Can be 'npm` or 'vsce'"
13
+ required: true
14
+
15
+ jobs:
16
+ publish-release:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout .github repo
20
+ uses: actions/checkout@master
21
+ with:
22
+ repository: rokucommunity/workflows
23
+
24
+ - name: Setup node
25
+ uses: actions/setup-node@master
26
+ with:
27
+ node-version: "16.20.2"
28
+
29
+ - name: Run npm ci
30
+ run: npm ci
31
+
32
+ - name: Set RUNNER_DEBUG env variable
33
+ run: |
34
+ if [[ "$RUNNER_DEBUG" == "1" ]]; then
35
+ echo "RUNNER_DEBUG=true" >> $GITHUB_ENV
36
+ else
37
+ echo "RUNNER_DEBUG=false" >> $GITHUB_ENV
38
+ fi
39
+
40
+ - name: Run publish
41
+ env:
42
+ GH_TOKEN: ${{ github.token }}
43
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44
+ VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
45
+ run: |
46
+ npx ts-node src/cli.ts \
47
+ publish-release \
48
+ --projectName "${{ github.repository }}" \
49
+ --ref ${{ inputs.ref }} \
50
+ --releaseType ${{ inputs.release-type }}
@@ -0,0 +1,16 @@
1
+ name: Delete Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ type: string
8
+ description: "The version to delete"
9
+ required: true
10
+
11
+ jobs:
12
+ run:
13
+ uses: rokucommunity/workflows/.github/workflows/delete-release.yml@master
14
+ with:
15
+ version: ${{ github.event.inputs.version }}
16
+ secrets: inherit
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+
8
+
9
+ ## [1.0.7](https://github.com/rokucommunity/.github/compare/v1.0.1...v1.0.7) - 2025-03-12
10
+ ### Changed
11
+ - Increment version to 1.0.1 ([98ba3ee](https://github.com/rokucommunity/.github/commit/98ba3ee))
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 RokuCommunity
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,157 @@
1
+ # Release Workflow System
2
+
3
+ This repository holds reusable and template workflows for the new release system.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Overview](#overview)
8
+ - [Workflow Templates](#workflow-templates)
9
+ - [Shared CI](#shared-ci)
10
+ - [Step 1: Initialize Release](#step-1-initialize-release)
11
+ - [Step 2: Create Release Artifacts](#step-2-create-release-artifacts)
12
+ - [Step 3: Publish Release](#step-3-publish-release)
13
+ - [Repository Setup](#repository-setup)
14
+ - [Setting Up Template Workflows in a Repository](#setting-up-template-workflows-in-a-repository)
15
+ - [Recovering from a Failed Release CI](#recovering-from-a-failed-release-ci)
16
+ - [Command Line](#command-line)
17
+
18
+ ---
19
+
20
+ ## Overview
21
+
22
+ The CI flow consists of three key steps: **[Initialize Release](#step-1-initialize-release), [Create Release Artifacts](#step-2-create-release-artifacts), and [Publish Release](#step-3-publish-release)**. These workflows ensure a structured process for versioning, creating artifacts, and publishing new releases.
23
+
24
+ ---
25
+
26
+ ## Workflow Templates
27
+
28
+ Each workflow step has an associated **template** to set up workflow triggers and call the reusable workflows from the Shared CI.
29
+
30
+ ### Template Purposes:
31
+
32
+ - Hook into repository workflow triggers.
33
+ - Call reusable workflows in the Shared CI.
34
+ - Standardize workflow execution across repositories.
35
+
36
+ ---
37
+
38
+ ## Shared CI
39
+
40
+ ### Step 1: Initialize Release
41
+
42
+ - **Purpose**: Prepares a new release by incrementing the version and creating a release branch.
43
+ - **Triggers**: Manual dispatch with required parameters.
44
+ - **Actions**:
45
+ 1. Increment the version number.
46
+ 2. Create and checkout a new branch (`release/version`).
47
+ 3. Commit the updated version number.
48
+ 4. Update and commit the changelog.
49
+ 5. Open a draft GitHub release.
50
+ 6. Create a pull request for review. _Note, this new pull request will trigger the next step._
51
+ - **Required Parameters**:
52
+ - `branch` (target branch for the release)
53
+ - `release_type` (e.g., major, minor, patch)
54
+ - [Initialize Release Template](https://github.com/rokucommunity/.github/blob/master/workflow-templates/initialize-release.yml)
55
+
56
+ ### Step 2: Create Release Artifacts
57
+
58
+ - **Purpose**: Creates the release artifacts, and upload them.
59
+ - **Triggers**: Pushes and updates to `release/*` branches.
60
+ - **Actions**:
61
+ 1. Build the release artifacts.
62
+ 2. Upload artifacts to the draft GitHub release.
63
+ - **Required Parameters** _(these are hardcoded in the template)_:
64
+ - `branch` (The head ref for the release PR)
65
+ - `node-version` (The node version used to build the artifacts)
66
+ - `asset-paths` (The glob path used to get all the release artifacts)
67
+ - [Create Release Artifacts Release Template](https://github.com/rokucommunity/.github/blob/master/workflow-templates/create-release-artifacts.yml)
68
+ ### Step 3: Publish Release
69
+
70
+
71
+ - **Purpose**: Finalizes the release by marking it as non-draft and publishing the code.
72
+ - **Triggers**: Merging of a `release/*` branch.
73
+ - **Actions**:
74
+ 1. Mark the GitHub release as non-draft.
75
+ 2. Publish the release to users (e.g., npm, VS Code Marketplace).
76
+ - [Publish Release Template](https://github.com/rokucommunity/.github/blob/master/workflow-templates/publish-release.yml)
77
+ - **Required Parameters** _(these are hardcoded in the template)_:
78
+ - `branch` (The head ref for the release PR)
79
+ - `release-store` (The head ref for the release PR)
80
+
81
+ ---
82
+
83
+ ## Repository Setup
84
+
85
+ To integrate this release workflow system into a new repository, follow these steps:
86
+
87
+ 1. **Add Workflow Templates**: Each repository must include the workflow templates: `initialize-release`, `create-release-artifacts`, `publish-release` from this repository. More details in this section: [Setting Up Template Workflows in a Repository](#setting-up-template-workflows-in-a-repository)
88
+
89
+ [_Example repository workflow setup_](https://github.com/rokucommunity/release-testing/tree/master/.github/workflows)
90
+
91
+ 2. **Ensure Required NPM Script Exist**:
92
+ - `package`: Compiles the application.
93
+
94
+ _Example `package.json`_
95
+ ```json
96
+ "scripts": {
97
+ "package": "echo \"Place holder for build command\" && mkdir out && echo \"Hello World!\" > hello.txt"
98
+ },
99
+ ```
100
+ 3. **Build Artifacts Paths**:
101
+ - The `package` script name and place all artifacts in a way that the `asset_paths` set in [Create Release Artifacts Release Template](https://github.com/rokucommunity/.github/blob/master/workflow-templates/create-release-artifacts.yml) is selectable.
102
+ - The post-build step will look for release artifacts in this directory to upload to the GitHub release.
103
+
104
+ ---
105
+ ### Setting Up Template Workflows in a Repository
106
+
107
+ To integrate the release workflow system into a repository, follow these steps to add the required workflow templates from the **RokuCommunity** organization:
108
+
109
+ ### Step 1: Add Workflow Templates
110
+ 1. Navigate to your repository on GitHub.
111
+ 2. Click on the **Actions** tab.
112
+ 3. Click **New workflow** or go directly to `.github/workflows`.
113
+ 4. Under **"Choose a workflow"**, find the **By RokuCommunity** templates:
114
+ - **Initialize Release**
115
+ - **Create Release Artifacts**
116
+ - **Publish Release**
117
+ 5. Click on each template and select **"Configure"**.
118
+
119
+ ### Step 2: Check needed edits
120
+ 1. Edit `asset_paths` if needed
121
+ 2. Edit `node-version` if needed
122
+ 2. Edit `publish-store` if needed
123
+
124
+ ### Step 3: Commit the Workflow Files
125
+ 1. Click **Commit changes...**.
126
+ 2. Ensure the commit is made to the default branch (master)
127
+ 5. Click **Commit changes**
128
+
129
+ Once these workflows are set up, your repository will automatically follow the structured release process!
130
+
131
+ ---
132
+ ## Recovering from a Failed Release CI
133
+
134
+ If the release CI fails and does not recover automatically, follow these steps to reset the release process:
135
+
136
+ 1. **Delete the GitHub Release**
137
+ - Go to the **Releases** section of your repository.
138
+ - Find the failed release.
139
+ - Click **Delete release**.
140
+
141
+ 2. **Delete the Pull Request for the Release**
142
+ - Navigate to the **Pull Requests** tab.
143
+ - Locate the pull request associated with the release.
144
+ - Close and delete the pull request.
145
+
146
+ 3. **Delete the Release Branch**
147
+ - Go to the **Branches** section of your repository.
148
+ - Find the branch created for the release (e.g., `release/version`).
149
+ - Delete the branch.
150
+
151
+ _Note there is a [workflow template: Delete Release](https://github.com/rokucommunity/.github/blob/master/workflow-templates/delete-release.yml) that does all three steps_
152
+
153
+ ---
154
+ ## Command Line
155
+
156
+ How would the command line work in each repository? The repos won't have the Reusable CI scripts.
157
+