diff --git a/.changeset/config.json b/.changeset/config.json index 8bfe20c..e4f3452 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -10,5 +10,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": ["starlight-save-file-component-docs"] } diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..fb706b3 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,31 @@ +{ + $schema: "https://docs.renovatebot.com/renovate-schema.json", + extends: [ + ":disableDependencyDashboard", + ":semanticPrefixFixDepsChoreOthers", + ":ignoreModulesAndTests", + "workarounds:all", + "helpers:pinGitHubActionDigestsToSemver", + "docker:disable", + ], + rangeStrategy: "bump", + ignorePaths: ["**/node_modules/**"], + packageRules: [ + { + groupName: "github-actions", + matchManagers: ["github-actions"], + }, + { + matchManagers: ["npm"], + groupName: "dependencies", + matchDepTypes: ["devDependencies", "dependencies", "peerDependencies"], + enabled: false, + }, + { + description: "Disable package manager version updates", + matchPackageNames: ["pnpm"], + matchDepTypes: ["packageManager"], + enabled: false, + }, + ], +} diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 1defa5d..fd0205c 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -10,13 +10,13 @@ jobs: autofix: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup PNPM - uses: pnpm/action-setup@v3 + uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version: 20 cache: "pnpm" @@ -32,6 +32,6 @@ jobs: - name: Run pngquant run: | shopt -s globstar - find . -name '*.png' -exec pngquant --ext .png --force 256 {} \; + find . -name '*.png' -exec pngquant --ext .png 256 {} \; - - uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c + - uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index 162e678..5de5457 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -11,12 +11,12 @@ jobs: steps: - name: Generate GitHub App token id: generate_token - uses: tibdex/github-app-token@v2.1.0 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 with: app_id: ${{ secrets.BOT_APP_ID }} private_key: ${{ secrets.BOT_PRIVATE_KEY }} - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Ensure labels exist env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} @@ -49,7 +49,7 @@ jobs: gh label create "🏯 styles" --description "Stylesheets or design updates" --color "550F5A" --force gh label create "🔒 wontfix" --description "This will not be worked on" --color "FFFFFF" --force - - uses: actions/labeler@v5 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5 with: configuration-path: .github/labeler.yaml sync-labels: true diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 35426aa..30466bd 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -24,9 +24,9 @@ jobs: starlight-save-file-component: ${{ steps.filter.outputs.starlight-save-file-component }} steps: - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: dorny/paths-filter@v3 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: filter with: filters: | @@ -44,19 +44,19 @@ jobs: steps: - name: Generate GitHub App token id: generate_token - uses: tibdex/github-app-token@v2.1.0 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 with: app_id: ${{ secrets.BOT_APP_ID }} private_key: ${{ secrets.BOT_PRIVATE_KEY }} - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup PNPM - uses: pnpm/action-setup@v3 + uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version: ${{ env.NODE_VERSION }} cache: "pnpm" @@ -66,14 +66,23 @@ jobs: - name: Create Release Pull Request id: changesets - uses: changesets/action@v1 + uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc # v1.4.10 with: - commit: "[ci] release" - title: "[ci] release" + commit: "ci: release" + title: "ci: release" env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Get published version + if: steps.changesets.outputs.hasChangesets == 'true' + run: | + git checkout changeset-release/main + VERSION=$(node -p "require('./packages/starlight-save-file-component/package.json').version") + NAME=$(node -p "require('./packages/starlight-save-file-component/package.json').name") + git commit --amend -m "ci: release $NAME v$VERSION" --no-edit + git push origin changeset-release/main:changeset-release/main --force + image-tag: name: Image Tag runs-on: ubuntu-latest @@ -81,7 +90,7 @@ jobs: IMAGE_TAG: ${{ env.IMAGE_TAG }} steps: - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Read version from package.json id: get_version @@ -96,7 +105,7 @@ jobs: needs.changesets.outputs.hasChangesets == 'false' && ( contains(github.event.head_commit.message, 'deploy') || - contains(github.event.head_commit.message, '[ci] release') + contains(github.event.head_commit.message, 'ci: release') ) ) || github.event_name == 'workflow_dispatch' @@ -105,13 +114,13 @@ jobs: contents: write id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup PNPM - uses: pnpm/action-setup@v3 + uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version: ${{ env.NODE_VERSION }} cache: "pnpm" @@ -134,10 +143,10 @@ jobs: contents: write steps: - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - id: extract-changelog - uses: sean0x42/markdown-extract@v2.1.0 + uses: sean0x42/markdown-extract@7b185cbe85263116bbf741e739e7198ba86465dc # v2.1.0 with: file: packages/starlight-save-file-component/CHANGELOG.md pattern: ${{ needs.image-tag.outputs.IMAGE_TAG }} @@ -163,7 +172,7 @@ jobs: if: env.RELEASE_SKIPPED == 'false' env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }} - uses: Ilshidur/action-discord@0.3.2 + uses: Ilshidur/action-discord@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9 # 0.3.2 with: args: | # ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }} diff --git a/.github/workflows/welcome-bot.yaml b/.github/workflows/welcome-bot.yaml index 6bdd228..29942a3 100644 --- a/.github/workflows/welcome-bot.yaml +++ b/.github/workflows/welcome-bot.yaml @@ -15,19 +15,19 @@ jobs: steps: - name: Generate GitHub App token id: generate_token - uses: tibdex/github-app-token@v2.1.0 + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 with: app_id: ${{ secrets.BOT_APP_ID }} private_key: ${{ secrets.BOT_PRIVATE_KEY }} - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Convert Repository Name to Title Case id: convert_repo_name run: | REPO_NAME="${{ github.event.repository.name }}" TITLE_CASE_REPO_NAME=$(echo "$REPO_NAME" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2))} 1') echo "title_case_repo_name=$TITLE_CASE_REPO_NAME" >> $GITHUB_ENV - - uses: zephyrproject-rtos/action-first-interaction@7e6446f8439d8b4399169880c36a3a12b5747699 + - uses: zephyrproject-rtos/action-first-interaction@58853996b1ac504b8e0f6964301f369d2bb22e5c with: repo-token: ${{ steps.generate_token.outputs.token }} pr-opened-message: |