- Install and configure pre-commit for the repository
- Install Node 20
- Install dependencies
npm i
- Install nektos/act for testing
- Copy a valid environment SDK key for testing locally
- Configure the required flags as detailed below.
In order to evaluate the test workflows successfully, your test environment must have the following flag configurations.
test-number-flag is a numeric flag that evaluates to 1
when on and 0
when off. No targeting rules should be provided.
test-boolean-flag is a boolean flag that evaluates to true
when on and false
when off. No targeting rules should be provided.
test-json-flag is a JSON flag that evaluates to {"pet": "cat"}
when on and {"pet": "dog"}
when off. No targeting rules should be provided.
test-string-flag is a string flag that should evaluate to "fallthrough" when on and "off" when "off". It should also have the below targeting rules:
- A context kind of
GithubCustomAttributes
and a key ofcontext-key
should returncustom
. - A context kind of
GithubCustomAttributes
and a key ofld-github-action-flags
should returncustom
. - A context kind of
GithubCustomAttributes
and a group ofbeta
should returncustom
. - A context kind of
GitHubRunner
and aRUNNER_TAG
ofGitHub Actions
should returnrunner
. - A context kind of
GitHub
with anyGITHUB_ACTOR
set should returngithub
.
The action is built using @vercel/ncc.
npm run build
Use nektos/act to run actions locally. The RUNNER_TRACKING_ID
environment variable will not be available automatically, preventing GitHubRunner
related tests from passing. We must set it manually as shown below.
act --env RUNNER_TRACKING_ID=1 -s SDK_KEY=<SDK-KEY>
Read more: Example commands
Follow instructions to publish a release to the GitHub Marketplace.
Publishing is a manual step even if automation is used to create a release.
Read more: Semantic versioning