diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 34380e159..13cf2b49d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Python test +name: main GitHub CI on: [push, pull_request] @@ -44,6 +44,17 @@ jobs: name: html-docs path: docs/build/html/ + cog_check_job: + runs-on: ubuntu-latest + name: cocogitto checks + steps: + - uses: actions/checkout@main + with: + fetch-depth: 0 + + - name: Conventional commits compliance + uses: oknozor/cocogitto-action@v3 + publish: needs: build # Only publish documentation when merging into `origin/main`.` diff --git a/.github/workflows/cocogitto.yml b/.github/workflows/cocogitto.yml new file mode 100644 index 000000000..d82daffb3 --- /dev/null +++ b/.github/workflows/cocogitto.yml @@ -0,0 +1,32 @@ +name: cocogitto + +on: + workflow_dispatch: + branches: main + +jobs: + # Only update release when merging into `origin/main`.` + if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'yoctoyotta1024'" + release: + steps: + - name: Perform release + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Cocogitto release + id: release + uses: oknozor/cocogitto-action@v3 + with: + release: true + git-user: 'yoctoyotta1024' + git-user-email: 'yoctoyotta1024@yahoo.com' + + - name: Generate Changelog + run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md + + - name: Upload github release + uses: softprops/action-gh-release@v1 + with: + body_path: GITHUB_CHANGELOG.md + tag_name: ${{ steps.release.outputs.version }}