From 6902243895944217a248a0b3c7ee2f073687d852 Mon Sep 17 00:00:00 2001 From: Roger Date: Sun, 5 Apr 2026 21:18:49 +0800 Subject: [PATCH] chore: update CI/CD workflows, Homebrew and new contributors (#552) --- .github/dependabot.yml | 13 +++---- .github/release-drafter.yml | 31 ---------------- .github/workflows/build.yml | 2 +- .github/workflows/contributors.yml | 37 +++++++++++++------ .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 14 ++------ .github/workflows/test.yml | 2 +- .goreleaser.yml | 27 +++++++++++++- CONTRIBUTORS.svg | 57 ------------------------------ README.md | 3 +- 10 files changed, 68 insertions(+), 120 deletions(-) delete mode 100644 .github/release-drafter.yml delete mode 100644 CONTRIBUTORS.svg diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 599af2b..f993c6d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,13 +5,14 @@ updates: schedule: interval: "weekly" open-pull-requests-limit: 10 - target-branch: dev -# ignore: -# - dependency-name: "example-package" -# versions: ["2.x.x"] + target-branch: main + ignore: + - dependency-name: "modernc.org/sqlite" + versions: [">=1.32.0"] # v1.32+ requires Go 1.21, project is pinned to Go 1.20 + - dependency-name: "golang.org/x/text" # will be removed in upcoming refactoring - package-ecosystem: "github-actions" directory: "/" schedule: interval: "monthly" - open-pull-requests-limit: 5 - target-branch: dev \ No newline at end of file + open-pull-requests-limit: 8 + target-branch: main diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index e5782c3..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,31 +0,0 @@ -name-template: 'hack-browser-data-$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' -categories: - - title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bugfix' - - 'bug' - - title: '🧰 Maintenance' - label: 'chore' - - title: '📖 Document' - label: 'doc' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' -version-resolver: - major: - labels: - - 'major' - minor: - labels: - - 'minor' - patch: - labels: - - 'patch' - default: patch -template: | - ## Changes - $CHANGES diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b90dd3f..0897fd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index e07091b..dbe9331 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -1,21 +1,38 @@ name: Contributors + on: - schedule: - - cron: '0 1 * * 0' # At 01:00 on Sunday. push: branches: - main + paths-ignore: + - README.md + schedule: + - cron: '0 1 1 * *' # 1st of each month at 01:00 UTC workflow_dispatch: - inputs: - logLevel: - description: 'manual run' - required: false - default: '' + jobs: contributors: runs-on: ubuntu-latest steps: - - uses: bubkoo/contributors-list@v1 + - name: Generate app token + uses: actions/create-github-app-token@v3 + id: app-token with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - round: true + app-id: ${{ secrets.HACKBROWSERDATA_BOT_APP_ID }} + private-key: ${{ secrets.HACKBROWSERDATA_BOT_PRIVATE_KEY }} + + - name: Checkout + uses: actions/checkout@v6 + with: + token: ${{ steps.app-token.outputs.token }} + + - name: Update contributors list + uses: akhilmhdh/contributors-readme-action@v2.3.11 + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + with: + image_size: 100 + columns_per_row: 6 + readme_path: README.md + auto_detect_branch_protection: false + commit_message: 'chore: update contributors list [skip ci]' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ffd537b..1d01002 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb550f3..a59cc73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,14 +5,13 @@ on: permissions: contents: write - pull-requests: write jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -22,17 +21,10 @@ jobs: go-version-file: go.mod - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 + uses: goreleaser/goreleaser-action@v7 with: version: '~> v2' args: release --clean --draft env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - update_release_draft: - needs: goreleaser - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34e77b2..ecb0903 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index 8d1cc2f..b8294c3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -30,7 +30,11 @@ builds: archives: - id: "archive" formats: - - zip + - tar.gz + format_overrides: + - goos: windows + formats: + - zip files: - README.md - LICENSE @@ -62,5 +66,26 @@ checksum: name_template: "checksums-v{{ .Version }}.txt" algorithm: sha256 +brews: + - name: hack-browser-data + homepage: "https://github.com/moonD4rk/HackBrowserData" + description: "Extract and decrypt browser data from multiple browsers" + license: "MIT" + directory: Formula + skip_upload: auto + repository: + owner: moonD4rk + name: homebrew-tap + branch: main + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + commit_author: + name: "github-actions[bot]" + email: "github-actions[bot]@users.noreply.github.com" + commit_msg_template: "brew formula update for {{ .ProjectName }} version {{ .Tag }}" + install: | + bin.install "hack-browser-data" + test: | + system "#{bin}/hack-browser-data", "version" + release: prerelease: auto diff --git a/CONTRIBUTORS.svg b/CONTRIBUTORS.svg deleted file mode 100644 index 8d8de04..0000000 --- a/CONTRIBUTORS.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 56f7016..badaf2f 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,8 @@ Please see the [Contribution Guide](CONTRIBUTING.md) before contributing. ## Contributors -![](/CONTRIBUTORS.svg) + + ## Stargazers over time [![Star History Chart](https://api.star-history.com/svg?repos=moond4rk/hackbrowserdata&type=Date)](https://github.com/moond4rk/HackBrowserData)