diff --git a/.github/release.yml b/.github/release.yml index 63a6320..479cd74 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,15 +1,19 @@ changelog: + exclude: + labels: + - ignore-for-release + authors: + - octocat categories: - - title: 💥 Breaking changes + - title: Breaking Changes 🛠 labels: - - breaking-change - - title: ⚡️ Improvements + - breaking + - title: New Features 🎉 labels: - - enhancement - - documentation - - title: 👨‍🔧 Fixes + - feature + - title: Fixes 🔧 labels: - - bugs - - title: 🎨 Other changes + - fix + - title: Other Changes labels: - "*" \ No newline at end of file diff --git a/.github/workflows/bumpversion.yml b/.github/workflows/bumpversion.yml index 660776d..c8ee6dd 100644 --- a/.github/workflows/bumpversion.yml +++ b/.github/workflows/bumpversion.yml @@ -12,7 +12,7 @@ jobs: name: "Bump version and create changelog with commitizen" steps: - name: Check out - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/conventional-label.yaml b/.github/workflows/conventional-label.yaml new file mode 100644 index 0000000..ea2986d --- /dev/null +++ b/.github/workflows/conventional-label.yaml @@ -0,0 +1,10 @@ +on: + pull_request: +name: conventional-release-labels +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: bcoe/conventional-release-labels@v1 + with: + type_labels: '{"feat": "feature", "fix": "fix", "breaking": "breaking", "ci": "CI"}' \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a8d508b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: Publish + +on: + push: + tags: + - "v*.*.*" + + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d1ed3ed..5f6f7fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,9 +5,8 @@ on: pull_request: jobs: - build: + test: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Setup Go @@ -20,5 +19,19 @@ jobs: uses: golangci/golangci-lint-action@v6 with: version: v1.60 + - name: Format check + run: test -z "$(go fmt)" - name: Test run: go test ./... + lint-commit: + runs-on: ubuntu-latest + name: "Lint commit message" + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Install commitizen + run: | + python -m pip install --upgrade pip + python -m pip install commitizen + - name: Check commit message + run: cz check --rev-range HEAD