diff --git a/.github/workflows/_ci-node.yml b/.github/workflows/_ci-node.yml new file mode 100644 index 0000000..682792d --- /dev/null +++ b/.github/workflows/_ci-node.yml @@ -0,0 +1,33 @@ +--- +# This workflow is centrally managed in https://github.com/LizardByte/.github/ +# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in +# the above-mentioned repo. + +# To use, add the `npm-pkg` repository label to identify repositories that should trigger this workflow. + +# This will run standard CI for Node.js/npm/TypeScript projects. + +name: CI-Node +permissions: + contents: write # required for release_setup action + +on: + push: + branches: + - master + pull_request: + branches: + - master + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + call-ci-node: + name: CI-Node + uses: LizardByte/.github/.github/workflows/__call-ci-node.yml@master + if: ${{ github.repository != 'LizardByte/.github' }} + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.gitignore b/.gitignore index 862c933..1ca8a71 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ node_modules/ package-lock.json dist/ + +# coverage +coverage/ +junit.xml diff --git a/build.sh b/build.sh index 77509e0..c4517f8 100644 --- a/build.sh +++ b/build.sh @@ -18,6 +18,17 @@ github_accounts=( output_dir="$(pwd)/dist" +# Debug output for CI environment +echo "GITHUB_JOB: ${GITHUB_JOB:-not set}" + +# Check if we're running in a GitHub Actions job named "build" +# If so, skip all token-dependent sections since secrets won't be available +if [[ "${GITHUB_JOB}" = "build" ]]; then + echo "Running in GitHub Actions 'build' job - skipping all token-dependent sections" + echo "Done!" + exit 0 +fi + echo "Building sponsors..." pushd configs/sponsors || exit 1 npx contribkit --outputDir="${output_dir}" -w=800 --name=sponsors --force diff --git a/configs/sponsors/contribkit.config.ts b/configs/sponsors/contribkit.config.ts index 7ec6d95..ecc4cd7 100644 --- a/configs/sponsors/contribkit.config.ts +++ b/configs/sponsors/contribkit.config.ts @@ -2,6 +2,7 @@ import { defineConfig, tierPresets, } from '@lizardbyte/contribkit' +import { extractSvgDimensions, createWrappedSponsorSvg } from './svg-utils.js' const createThemeAwareSvgStyle = (pathClass: string, lightColor: string = '#000000', darkColor: string = '#ffffff') => `