github / github/vscode-github-actions
Value 'release' is not valid for `environment` in a job
- Dominant language
- TypeScript
- Stars
- 660
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
I was following the [PyPI doc to setup trusted publisher with GitHub Actions](https://docs.pypi.org/trusted-publishers/using-a-publisher/), but I encountered this error in VS Code with the extension.
I think this is a false positive because`environment` seems to be able to be an arbitrary string, as the [GitHub doc describes](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment).
I was able to trace the issue down to [the language server's definition of the environment value](https://github.com/actions/languageservices/blob/3a8c29c2df26d94c6fd07c7a918a0dfabedba685/workflow-parser/src/workflow-v1.0.json#L1950-L1953), and also the [code that validated it but failed](https://github.com/actions/languageservices/blob/3a8c29c2df26d94c6fd07c7a918a0dfabedba685/languageservice/src/validate.ts#L143-L145). I didn't have time to dig in further, and hope this helps.
Contributor guide
Assessment
This issue has not been assessed yet.