Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand Down Expand Up @@ -81,10 +83,12 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: mkdir -p ${{ env.REPORTS_DIR }}
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand All @@ -107,7 +111,7 @@ jobs:
- name: Annotate Code
if: ${{ failure() || success() }}
# see https://github.com/DerLev/eslint-annotations
uses: DerLev/eslint-annotations@e75c54a2984700c03d60c5252c9c6a203bf013f5 # v2
uses: DerLev/eslint-annotations@a79ea65c1b45a649c48bcc6efc0103b6fd2e4c5f # v2
with:
eslint-report: ${{ env.REPORTS_DIR }}/eslint.json
- name: artifact eslint result
Expand All @@ -127,10 +131,12 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: mkdir -p ${{ env.REPORTS_DIR }}
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand All @@ -156,10 +162,12 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: mkdir -p ${{ env.REPORTS_DIR }}
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand All @@ -186,6 +194,8 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: fetch build artifact
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
Expand Down Expand Up @@ -229,9 +239,11 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ matrix.node-version }}
package-manager-cache: false
Expand Down Expand Up @@ -299,9 +311,11 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ matrix.node-version }}
package-manager-cache: false
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
ref: ${{ needs.bump.outputs.version }}
fetch-depth: 0
fetch-tags: true
persist-credentials: false
- name: Configure Git
# needed for push back of changes
run: |
Expand All @@ -56,7 +57,7 @@ jobs:
git config --local user.name "${GITHUB_ACTOR}"
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand Down Expand Up @@ -88,11 +89,13 @@ jobs:
git add package.json yarn.lock
git commit -s -m "$GCOMMIT_MESSAGE"
git tag -a -m "$GCOMMIT_MESSAGE" "$GTAG_NAME"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push --follow-tags
env:
COMMIT_MESSAGE: ${{ github.event.inputs.commitMessage }}
GTAG_NAME: ${{ steps.bump.outputs.version }}
VERSION_PLAIN: ${{ steps.bump.outputs.version_plain }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build:
needs: [ "bump" ]
Expand All @@ -105,9 +108,10 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ needs.bump.outputs.version }}
persist-credentials: false
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand Down Expand Up @@ -152,6 +156,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ needs.bump.outputs.version }}
persist-credentials: false
- name: fetch build artifact
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
Expand All @@ -176,9 +181,10 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ needs.bump.outputs.version }}
persist-credentials: false
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand Down Expand Up @@ -222,7 +228,7 @@ jobs:
path: .
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
package-manager-cache: false
Expand Down Expand Up @@ -288,14 +294,20 @@ jobs:
"$DIST_DIR/NOTICE" \
"$DIST_DIR/bom.json"
- name: Create Release
id: release
# see https://github.com/softprops/action-gh-release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.bump.outputs.version }}
name: ${{ needs.bump.outputs.version_plain }}
prerelease: ${{ github.event.inputs.prerelease }}
files: '${{ env.ASSETS_DIR }}/*'
# If a tag already has a GitHub release, the existing release will be updated with the release assets.
R_PRERELEASE: ${{ github.event.inputs.prerelease }}
R_TITLE: ${{ needs.bump.outputs.version_plain }}
R_VERSION: ${{ needs.bump.outputs.version }}
run: |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs manual testing

set -exu
prerelease_flag=""
if [ "$R_PRERELEASE" = "true" ]; then
prerelease_flag="--prerelease"
fi
gh release create \
"$R_VERSION" \
$prerelease_flag \
--title "$R_TITLE" \
--notes "" \
"$ASSETS_DIR"/*
47 changes: 47 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# For details of what checks are run for PRs please refer below
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: GitHub Actions Security with zizmor

on:
pull_request:
paths:
- '.github/workflows/**'
push:
paths:
- ".github/workflows/**"
schedule:
Comment thread
jkowalleck marked this conversation as resolved.
# Every Saturday 00:00 UTC
- cron: '0 0 * * 6'

concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

permissions: {}

jobs:
zizmor:
name: zizmor
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Run zizmor
# see https://github.com/zizmorcore/zizmor-action
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
with:
# advanced-security: false => emit findings as workflow-command annotations (::error file=…) rather than
# uploading a SARIF report to GitHub's Security tab.
# Uploading SARIF requires `security-events: write` and GitHub Advanced Security (GHAS),
# both of which are unnecessary here and would violate the least-privilege policy.
# The two modes are mutually exclusive: advanced-security must be false for
# annotations to take effect.
advanced-security: false
Comment thread
jkowalleck marked this conversation as resolved.
annotations: true
Loading