From 15cbd91cca68975c2aef930910f548c38be7ebb5 Mon Sep 17 00:00:00 2001 From: Stoney Jackson Date: Tue, 20 Feb 2024 23:47:38 +0000 Subject: [PATCH] ci: automatic release --- .github/pull_request_template.md | 64 ++++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 34 +++++++++++++++++ .releaserc.yaml | 19 ++++++++++ 3 files changed, 117 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/release.yaml create mode 100644 .releaserc.yaml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..dc21dbe --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,64 @@ +Thank you for your help! Please read the following before contributing to +this project. + +## Legal + +This project and its contents are licensed under GPL-3.0 or greater. +See the LICENSE file at the root of this project. Your contributions must +therefore also be licensed under GPL-3.0 or greater. + +Also by contributing to this project, you are signing off on the +[Developer Certificate of Origin (DCO)](https://developercertificate.org/) +asserting that your contributions may legally be licensed under GPL-3.0 +or greater. If you do not want to sign off on the DCO, close or delete +this PR. + +## Instructions + +Make all the changes you want. When you are done, request a review. +Work with the maintainer to complete your contribution. +Complete the template below to your best ability. + +--- + +# Template for Final Squash Commit Message + +``` +Make sure your subject line follows Conventional Commits. +Remember `feat:` trumps `fix:` and add an `!` if it contains a breaking change. +Delete any section that is not needed. + +## BREAKING CHANGES + +Non backwards compatible changes. + +* #Issue-number - Blah blah blah + +## Deprecations + +Things that will disappear in future releases. + +* #Issue-number - Blah blah blah + +## Features + +New functionality. +New functionality containing non-backwards compatible functionality are also listed above. + +* #Issue-number - Blah blah blah + +## Fixes + +Bug fixes for existing functionality. +Bug fixes containing non-backwards compatible functionality are also listed above. + +* #Issue-number - Blah blah blah + +--- + +Those who made this possible: + +Co-authored-by: First Last +Co-authored-by: First Last +Co-authored-by: First Last +``` diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3d0394d --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +--- +# yamllint disable line-length +name: Release + +on: + push: + branches: + - main + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - + name: Tag + uses: codfish/semantic-release-action@v3 + id: semantic + with: + branches: | + [ + 'main' + ] + additional-packages: | + [ + 'conventional-changelog-conventionalcommits' + ] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.yaml b/.releaserc.yaml new file mode 100644 index 0000000..a9a5837 --- /dev/null +++ b/.releaserc.yaml @@ -0,0 +1,19 @@ +# Also here is a project that uses +# semantic-release and specifies its configuration using YAML: +# https://github.com/GeekHomeInside/semantic-release-example/blob/master/.releaserc.yaml +--- +branches: + # Only run on main. + - main + +plugins: + # Order matters. + + - - "@semantic-release/commit-analyzer" + # Analyzes the commit messages since the last release + # and determines the next version number. + # Populates ${nextRelease.version} among other variables. + - preset: conventionalcommits + + - - "@semantic-release/github" + # Creates GitHub release entry and uploads specified assets.