mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
fix(release): use npm trusted publishing
This commit is contained in:
parent
45374fa3ab
commit
ceb578e0f6
2 changed files with 3 additions and 2 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -24,6 +24,7 @@ on:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ktx-release-${{ github.ref }}
|
group: ktx-release-${{ github.ref }}
|
||||||
|
|
@ -124,4 +125,3 @@ jobs:
|
||||||
KTX_RELEASE_KIND: ${{ inputs.release_kind }}
|
KTX_RELEASE_KIND: ${{ inputs.release_kind }}
|
||||||
KTX_PRERELEASE_BRANCH: next
|
KTX_PRERELEASE_BRANCH: next
|
||||||
FORCE_RELEASE: ${{ inputs.force_release }}
|
FORCE_RELEASE: ${{ inputs.force_release }}
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ describe('release workflow', () => {
|
||||||
assert.match(workflow, /publish_live:/);
|
assert.match(workflow, /publish_live:/);
|
||||||
assert.match(workflow, /default: false/);
|
assert.match(workflow, /default: false/);
|
||||||
assert.match(workflow, /^ contents: write$/m);
|
assert.match(workflow, /^ contents: write$/m);
|
||||||
|
assert.match(workflow, /^ id-token: write$/m);
|
||||||
assert.match(workflow, /fetch-depth: 0/);
|
assert.match(workflow, /fetch-depth: 0/);
|
||||||
assert.match(workflow, /registry-url: "https:\/\/registry\.npmjs\.org"/);
|
assert.match(workflow, /registry-url: "https:\/\/registry\.npmjs\.org"/);
|
||||||
assert.match(workflow, /Prepare next prerelease branch/);
|
assert.match(workflow, /Prepare next prerelease branch/);
|
||||||
|
|
@ -24,7 +25,7 @@ describe('release workflow', () => {
|
||||||
assert.match(workflow, /KTX_RELEASE_KIND: \$\{\{ inputs.release_kind \}\}/);
|
assert.match(workflow, /KTX_RELEASE_KIND: \$\{\{ inputs.release_kind \}\}/);
|
||||||
assert.match(workflow, /KTX_PRERELEASE_BRANCH: next/);
|
assert.match(workflow, /KTX_PRERELEASE_BRANCH: next/);
|
||||||
assert.match(workflow, /FORCE_RELEASE: \$\{\{ inputs.force_release \}\}/);
|
assert.match(workflow, /FORCE_RELEASE: \$\{\{ inputs.force_release \}\}/);
|
||||||
assert.match(workflow, /NODE_AUTH_TOKEN: \$\{\{ secrets.NPM_TOKEN \}\}/);
|
assert.doesNotMatch(workflow, /NODE_AUTH_TOKEN/);
|
||||||
assert.doesNotMatch(workflow, /^ push:/m);
|
assert.doesNotMatch(workflow, /^ push:/m);
|
||||||
assert.doesNotMatch(workflow, /^ pull_request:/m);
|
assert.doesNotMatch(workflow, /^ pull_request:/m);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue