From 56b31ccc38bc53f997e35323ce5ef13e5ef61803 Mon Sep 17 00:00:00 2001 From: Dan Webb Date: Wed, 13 Apr 2022 15:42:04 +0100 Subject: [PATCH] Fix: Add PR template, release, publsh and unit workflows (#242) --- .github/PULL_REQUEST_TEMPLATE.md | 23 ++++++++++++----------- .github/workflows/linters.yml | 4 ++-- .github/workflows/please-release.yml | 2 +- .github/workflows/publish.yaml | 11 ++++++++++- .github/workflows/unit.yml | 23 ----------------------- CODEOWNERS | 1 + 6 files changed, 26 insertions(+), 38 deletions(-) delete mode 100644 .github/workflows/unit.yml create mode 100644 CODEOWNERS diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 09db3c0..f7f1931 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,10 @@ -# Description +### Description -[Please describe what this change achieves] + -## Issues Resolved +### Issues Resolved -[List any existing issues this PR resolves, or any Discourse or -StackOverflow discussions that are relevant] + ## Type of Change @@ -13,14 +12,16 @@ Our release process assumes you are using Conventional Commit messages. The most important prefixes you should have in mind are: -_fix_: which represents bug fixes, and correlates to a SemVer patch. -_feat_: which represents a new feature, and correlates to a SemVer minor. -_feat!_:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a major version change. +- `_fix_`: which represents bug fixes, and correlates to a SemVer patch. +- `_feat_`: which represents a new feature, and correlates to a SemVer minor. +- `_feat!_`:, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the !) and will result in a major version change. If you have not included a conventional commit message this can be fixed on merge. -## Check List +### Check List -- [ ] New functionality includes tests -- [ ] All tests pass +- [ ] All tests pass. +- [ ] All style checks pass. +- [ ] Functionality includes testing. +- [ ] Functionality has been documented in the README if applicable - [ ] Commit message includes a [Conventional Commit Message](https://www.conventionalcommits.org/en/v1.0.0) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 263565c..79af374 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ['2.6', '2.7', '3.0', '3.1'] + ruby: ['2.7', '3.0', '3.1'] name: Chefstyle on Ruby ${{ matrix.ruby }} steps: - uses: actions/checkout@v2 @@ -35,7 +35,7 @@ jobs: needs: [chefstyle, yamllint] strategy: matrix: - ruby: ['2.6', '2.7', '3.0', '3.1'] + ruby: ['2.7', '3.0', '3.1'] name: Unit Tests on Ruby ${{ matrix.ruby }} steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/please-release.yml b/.github/workflows/please-release.yml index 0962954..4bd43a5 100644 --- a/.github/workflows/please-release.yml +++ b/.github/workflows/please-release.yml @@ -1,5 +1,5 @@ --- -on: +'on': push: branches: - main diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a3d7b1b..639058d 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -6,7 +6,7 @@ name: Publish types: [published] jobs: - build: + github-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -15,3 +15,12 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} owner: ${{ secrets.OWNER }} + rubygems-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and publish gem + uses: actionshub/publish-gem-to-rubygems@main + env: + token: ${{ secrets.RUBYGEMS_TOKEN }} + owner: ${{ secrets.OWNER }} diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml deleted file mode 100644 index 6d699d3..0000000 --- a/.github/workflows/unit.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Unit - -'on': - pull_request: - push: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - ruby: ['2.6', '2.7', '3.0', '3.1'] - name: Unit test on Ruby ${{ matrix.ruby }} - steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - run: bundle exec rake test diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..b7175b0 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +@test-kitchen/maintainers