-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rifa Achrinza <[email protected]>
- Loading branch information
Showing
6 changed files
with
1,213 additions
and
547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-License-Identifier: FSFAP | ||
# SPDX-FileCopyrightText: Copyright (c) 2024 Rifa Achrinza | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
uses: ./.github/workflows/ci.yaml | ||
build: | ||
name: Build | ||
needs: test | ||
permissions: | ||
id-token: write | ||
contents: read | ||
actions: read | ||
# Do not pin to hash | ||
# See: https://github.com/slsa-framework/slsa-verifier/issues/12 | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | ||
with: | ||
node-version: 22 | ||
run-scripts: ci, test | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-24.04 | ||
needs: [build] | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
egress-policy: audit | ||
- name: Download Tarball | ||
uses: slsa-framework/slsa-github-generator/actions/nodejs/[email protected] | ||
with: | ||
name: ${{ needs.build.outputs.package-download-name }} | ||
path: ${{ needs.build.outputs.package-name }} | ||
sha256: ${{ needs.build.outputs.package-download-sha256 }} | ||
- name: Download Provenance | ||
uses: slsa-framework/slsa-github-generator/actions/nodejs/[email protected] | ||
with: | ||
name: ${{ needs.build.outputs.provenance-download-name }} | ||
path: attestations | ||
sha256: ${{ needs.build.outputs.provenance-download-sha256 }} | ||
- name: Publish Dry-Run | ||
env: | ||
TARBALL_PATH: ${{ needs.build.outputs.package-name }} | ||
run: npm publish --dry-run "$TARBALL_PATH" | ||
- name: Request for NPM 2FA Code | ||
uses: step-security/wait-for-secrets@5809f7d044804a5a1d43217fa8f3e855939fc9ef # v1.2.0 | ||
with: | ||
secrets: | | ||
npm-otp: | ||
name: NPM Registry OTP | ||
description: NPM Registry TOTP code for `achrinza-bot` NPM account | ||
- name: Publish Package | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
TARBALL_PATH: ${{ needs.build.outputs.package-name }} | ||
PROVENANCE_PATH: ./attestations/${{ needs.build.outputs.provenance-name }} | ||
run: | | ||
npm publish \ | ||
--access=public \ | ||
--provenance-file="$PROVENANCE_PATH" \ | ||
"$TARBALL_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,9 @@ | |
/nbproject | ||
npm-debug.log | ||
node-ipc.cjs | ||
/spec/coverage/ | ||
/coverage/ | ||
|
||
# Code editors | ||
\#*# | ||
.#* | ||
*~ |
Oops, something went wrong.