diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 40bf819..f8dcefc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,6 +15,8 @@ updates: commit-message: prefix: "chore" include: "scope" + labels: + - "Type: Maintenance" # Maintain dependencies for go modules - package-ecosystem: "gomod" @@ -25,6 +27,8 @@ updates: commit-message: prefix: "chore" include: "scope" + labels: + - "Type: Maintenance" # Maintain dependencies for docker - package-ecosystem: "docker" @@ -34,4 +38,6 @@ updates: target-branch: "main" commit-message: prefix: "chore" - include: "scope" \ No newline at end of file + include: "scope" + labels: + - "Type: Maintenance" \ No newline at end of file diff --git a/.github/workflows/autorelease.yml b/.github/workflows/autorelease.yml new file mode 100644 index 0000000..052793f --- /dev/null +++ b/.github/workflows/autorelease.yml @@ -0,0 +1,36 @@ +name: 🔖 Auto release gh action + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get Commit Count + id: get_commit + run: git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count | xargs -I {} echo COMMIT_COUNT={} >> $GITHUB_OUTPUT + + - name: Create release and tag + if: ${{ steps.get_commit.outputs.COMMIT_COUNT > 0 }} + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Create a GitHub release + if: ${{ steps.get_commit.outputs.COMMIT_COUNT > 0 }} + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag_version.outputs.new_tag }} + release_name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9f533f8..cd9b889 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,8 +3,6 @@ name: 🚨 CodeQL Analysis on: workflow_dispatch: pull_request: - branches: - - dev jobs: analyze: diff --git a/go.mod b/go.mod index 59a00b4..54ec400 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,11 @@ module github.com/projectdiscovery/ratelimit -go 1.14 +go 1.18 require github.com/stretchr/testify v1.8.1 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +)