cx-ms-shared-workflows-oidc-test 0.0.1 → 1.0.0-alpha.478caf0
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.
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/index.js +1 -0
- package/package.json +16 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SHI Corp - ASG
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# CS-MX-Github-Shared
|
|
2
|
+
Shared github actions and workflows
|
|
3
|
+
|
|
4
|
+
## npm workflows
|
|
5
|
+
|
|
6
|
+
Call the reusable workflows from one caller workflow so artifacts stay in the
|
|
7
|
+
same run:
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
jobs:
|
|
11
|
+
metadata:
|
|
12
|
+
uses: shicorp-asg/CX-MS-Github-Shared/.github/workflows/Metadata.yml@main
|
|
13
|
+
|
|
14
|
+
build:
|
|
15
|
+
needs: metadata
|
|
16
|
+
uses: shicorp-asg/CX-MS-Github-Shared/.github/workflows/BuildNPM.yml@main
|
|
17
|
+
with:
|
|
18
|
+
buildCommand: npm run build
|
|
19
|
+
version: ${{ needs.metadata.outputs.packageVersion }}
|
|
20
|
+
|
|
21
|
+
package:
|
|
22
|
+
needs: build
|
|
23
|
+
uses: shicorp-asg/CX-MS-Github-Shared/.github/workflows/GenerateNPMPackage.yml@main
|
|
24
|
+
with:
|
|
25
|
+
artifact: ${{ needs.build.outputs.artifact }}
|
|
26
|
+
|
|
27
|
+
publish:
|
|
28
|
+
needs: [metadata, package]
|
|
29
|
+
uses: shicorp-asg/CX-MS-Github-Shared/.github/workflows/PublishNPM.yml@main
|
|
30
|
+
with:
|
|
31
|
+
artifact: ${{ needs.package.outputs.artifact }}
|
|
32
|
+
packageFile: ${{ needs.package.outputs.packageFile }}
|
|
33
|
+
tag: ${{ needs.metadata.outputs.distTag }}
|
|
34
|
+
registryUrl: https://npm.pkg.github.com
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`PublishNPM` uses the `token` secret when passed, otherwise `GITHUB_TOKEN` for
|
|
38
|
+
GitHub Packages. For npmjs.com, omit the token to use trusted publishing (OIDC):
|
|
39
|
+
the caller needs `id-token: write`, and the npm trusted publisher must name the
|
|
40
|
+
caller's workflow file, not `PublishNPM.yml`. It verifies
|
|
41
|
+
the package attestation created by `GenerateNPMPackage` before publishing.
|
|
42
|
+
|
|
43
|
+
## Tests
|
|
44
|
+
|
|
45
|
+
The root npm project is a test fixture for the reusable workflows. The test
|
|
46
|
+
workflow runs on pushes that change the build or package workflows or the
|
|
47
|
+
fixture. It verifies the build artifact, packages it, checks the package
|
|
48
|
+
contents and attestation, then publishes the repacked
|
|
49
|
+
`@shicorp-asg/shared-workflows-build-test` package to GitHub Packages under the
|
|
50
|
+
`alpha` dist-tag. The fixture's `publishConfig` restricts publishing to GitHub
|
|
51
|
+
Packages.
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "1.0.0-alpha.478caf0";
|
package/package.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cx-ms-shared-workflows-oidc-test",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0-alpha.478caf0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Fixture for testing the reusable npm build workflow",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"registry": "https://npm.pkg.github.com"
|
|
11
|
+
},
|
|
6
12
|
"scripts": {
|
|
7
|
-
"
|
|
13
|
+
"build": "node tests/build-fixture.js"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"is-number": "7.0.0"
|
|
8
17
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
18
|
+
"repository": {
|
|
19
|
+
"url": "https://github.com/shicorp-asg/CX-MS-Github-Shared.git"
|
|
20
|
+
}
|
|
11
21
|
}
|