diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e82631a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +version: 2 + +updates: + - package-ecosystem: github-actions + directory: '/' + schedule: + interval: weekly + + - package-ecosystem: gomod + directory: '/' + schedule: + interval: weekly + groups: + gomod-security: + applies-to: security-updates + patterns: ['*'] + gomod-update: + applies-to: version-updates + patterns: ['*'] diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..51811e1 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,33 @@ +name: PR check + +on: + push: + branches: [ main ] + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - uses: gotesttools/gotestfmt-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: golangci/golangci-lint-action@v4 + with: + version: latest + + - name: Run tests + run: make test diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..426af15 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,29 @@ +name: Release Tag + +on: + push: + tags: + - v*.*.* + workflow_dispatch: + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - uses: goreleaser/goreleaser-action@v6 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}