Skip to content

Commit

Permalink
Merge pull request #16 from projectdiscovery/issue-15-autorelease
Browse files Browse the repository at this point in the history
Maintenance and autorelease gh action
  • Loading branch information
Mzack9999 committed Nov 24, 2022
2 parents 01b3991 + 02f6759 commit c596b7e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Expand Up @@ -15,6 +15,8 @@ updates:
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for go modules
- package-ecosystem: "gomod"
Expand All @@ -25,6 +27,8 @@ updates:
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for docker
- package-ecosystem: "docker"
Expand All @@ -34,4 +38,6 @@ updates:
target-branch: "main"
commit-message:
prefix: "chore"
include: "scope"
include: "scope"
labels:
- "Type: Maintenance"
36 changes: 36 additions & 0 deletions .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 }}
2 changes: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -3,8 +3,6 @@ name: 🚨 CodeQL Analysis
on:
workflow_dispatch:
pull_request:
branches:
- dev

jobs:
analyze:
Expand Down
8 changes: 7 additions & 1 deletion 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
)

0 comments on commit c596b7e

Please sign in to comment.