From cef3fbd5b0a1cb8c1c0c194c53e97f8ad01761c9 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Sat, 27 Jul 2024 23:44:24 -0500 Subject: [PATCH] ci: Add release workflow --- .github/changelog-generator.yaml | 19 +++++++++++++++++++ .github/workflows/release.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/update-majorver.yaml | 15 --------------- 3 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 .github/changelog-generator.yaml create mode 100644 .github/workflows/release.yaml delete mode 100644 .github/workflows/update-majorver.yaml diff --git a/.github/changelog-generator.yaml b/.github/changelog-generator.yaml new file mode 100644 index 0000000..4c00550 --- /dev/null +++ b/.github/changelog-generator.yaml @@ -0,0 +1,19 @@ +# yaml-language-server: $schema=https://gabe565.github.io/changelog-generator/config.schema.json +tag: + regexp: 'v\d+\.\d+\.\d+' +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/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..4374777 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,26 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + release: + name: Release + 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 diff --git a/.github/workflows/update-majorver.yaml b/.github/workflows/update-majorver.yaml deleted file mode 100644 index 5a485a1..0000000 --- a/.github/workflows/update-majorver.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: Update Major Version Tag - -on: - push: - tags: - - "v*" - -jobs: - update-majorver: - name: Update Major Version Tag - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: nowactions/update-majorver@v1