diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 66a15fd..8ecc15f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -19,7 +19,9 @@ _Provide a description of the overall goal (you can usually use the one from the ### Is this a rectricting or expanding change? -_[RESTRICTING|EXPANDING] Restricting changes are those that limit the current style or add new rules, while expanding changes are those that remove rules or relax the current ones._ +**_[RESTRICTING|EXPANDING] change** + +_Restricting changes are those that limit the current style or add new rules, while expanding changes are those that remove rules or relax the current ones._ ### References * **Issue:** _jira issue goes here, if suggesting a new feature or change, please discuss it in an issue first_ @@ -43,12 +45,3 @@ _If you find any, please describe all the special conditions._ _Automatic tests? Manual tests?_ _If it cannot be tested explain why._ - -_Add use cases if specs are incomplete or missing._ - -### How is it going to be deployed? - -_If it does not require anything special, just write "Standard deployment". Otherwise, put the required steps._ - -- [ ] _Step 1_ -- [ ] _Step 2_ diff --git a/.github/workflows/pr_title_validation.yml b/.github/workflows/pr_title_validation.yml new file mode 100644 index 0000000..e3dfb58 --- /dev/null +++ b/.github/workflows/pr_title_validation.yml @@ -0,0 +1,20 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e16ff97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Create gem release pull request +on: + push: + branches: + - 'master' +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v3 + id: release + with: + release-type: ruby + package-name: sequra-style + bump-minor-pre-major: true + version-file: 'lib/sequra/sequra-style/version.rb' + - uses: actions/checkout@v2 + if: ${{ steps.release.outputs.release_created }} + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2 + if: ${{ steps.release.outputs.release_created }} + - name: Publish gem to Github repository packages + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build *.gemspec + gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem + env: + GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" + OWNER: ${{ github.repository_owner }} + if: ${{ steps.release.outputs.release_created }}