-
Notifications
You must be signed in to change notification settings - Fork 21
chore: Use Trusted Publishing in NPM publish #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2ec761b
8bc48ef
2a69454
9a7d338
dccf00d
720ec48
c3ca223
5ce237b
93d63bb
41c58a8
0373884
4a494f6
5e54db0
d34e9d9
7749255
e6f679d
0513090
abafe04
c7c9232
386c777
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,24 +12,19 @@ jobs: | |
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.ref }} | ||
| repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 | ||
| with: | ||
| node-version: 18.x | ||
| node-version: 24.x | ||
| - name: Install dependencies | ||
| run: yarn install --check-files | ||
| run: npm ci | ||
| - name: compile | ||
| run: npx projen compile | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | ||
| - name: actionlint | ||
| run: | | ||
| bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
|
|
@@ -38,9 +33,9 @@ jobs: | |
| - name: Setup Node.js | ||
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 | ||
| with: | ||
| node-version: 18.x | ||
| node-version: 24.x | ||
| - name: Install dependencies | ||
| run: yarn install --check-files | ||
| run: npm ci | ||
| - name: lint | ||
| run: npx projen eslint | ||
| shellcheck: | ||
|
|
@@ -58,22 +53,26 @@ jobs: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | ||
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 | ||
| with: | ||
| node-version: 18.x | ||
| - run: yarn install --check-files | ||
| node-version: 24.x | ||
| - run: npm ci | ||
| - run: npm install -g cdk-import | ||
| - run: ./scripts/cdk-all.sh | ||
| - run: npx projen build | ||
| - name: Find mutations | ||
| id: self_mutation | ||
| run: |- | ||
| git add . | ||
| git diff --staged --patch --exit-code > .repo.patch || echo "self_mutation_happened=true" >> "${GITHUB_OUTPUT}" | ||
| git diff --staged --patch > .repo.patch | ||
lantoli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if [ -s .repo.patch ]; then | ||
| echo "self_mutation_happened=true" >> "${GITHUB_OUTPUT}" | ||
| fi | ||
| - name: Upload patch | ||
| if: steps.self_mutation.outputs.self_mutation_happened | ||
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 | ||
| with: | ||
| name: .repo.patch | ||
| path: .repo.patch | ||
| include-hidden-files: true | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Were hidden files not needed before?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think it's a new param, it took all files before. anyway this is a nit, it's to have a git patch when there are differences, in the normal use case where everything is ok, this is not needed. |
||
| - name: Fail build on mutation | ||
| if: steps.self_mutation.outputs.self_mutation_happened | ||
| run: |- | ||
|
|
@@ -87,8 +86,8 @@ jobs: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | ||
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 | ||
| with: | ||
| node-version: 18.x | ||
| - run: yarn install --check-files | ||
| node-version: 24.x | ||
| - run: npm ci | ||
| - run: npm install -g cdk | ||
| - run: npx projen build | ||
| - run: npx projen package:js | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, why 2 package managers when we can have just 1 :-)