diff --git a/.github/changelog-generator.yaml b/.github/changelog-generator.yaml new file mode 100644 index 0000000..0d6a59e --- /dev/null +++ b/.github/changelog-generator.yaml @@ -0,0 +1,17 @@ +# yaml-language-server: $schema=https://gabe565.github.io/changelog-generator/config.schema.json +filters: + exclude: + - "^docs" + - "^test" +groups: + - title: Breaking Changes + order: 0 + regexp: "^.+?!:" + - title: Features + order: 1 + regexp: "^(feat)" + - title: Fixes + order: 2 + regexp: "^(fix|perf)" + - title: Others + order: 999 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 016ea4a..17cec07 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -61,3 +61,24 @@ jobs: matrix: ${{ fromJson(needs.test-gen-deploy-matrix.outputs.matrix) }} steps: - run: echo ${{ matrix.name }} + + release: + name: Release + if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref_name, '.') + needs: [build, lint, test-gen-deploy-matrix, test-output] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Generate Changelog + id: changelog + uses: gabe565/changelog-generator@v1 + - name: Release + uses: softprops/action-gh-release@v2 + with: + body: ${{ steps.changelog.outputs.changelog }} + - uses: nowactions/update-majorver@v1