From 7695b054045d38b6e5bb718f81f68cfd8ea55ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 15 Mar 2024 12:08:31 +0100 Subject: [PATCH] Add releases instructions and CI workflow (#1) * Add releases instructions in README * Add github actions workflow --- .github/workflows/ci_maintainers_toolbox.yml | 41 ++++++++++++++++++++ README.md | 16 ++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/ci_maintainers_toolbox.yml diff --git a/.github/workflows/ci_maintainers_toolbox.yml b/.github/workflows/ci_maintainers_toolbox.yml new file mode 100644 index 0000000..758b989 --- /dev/null +++ b/.github/workflows/ci_maintainers_toolbox.yml @@ -0,0 +1,41 @@ +name: "[CI] Maintainers' toolbox" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + +env: + CI: "true" + SIMPLECOV: "true" + RUBY_VERSION: 2.7.5 + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + lint: + strategy: + fail-fast: false + matrix: + command: + - bundle exec rspec + name: Lint code + runs-on: ubuntu-latest + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + - run: ${{ matrix.command }} + name: ${{ matrix.command }} diff --git a/README.md b/README.md index 804a9a9..8212e18 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ There are a couple differences with the rest of the gems of this repository: * About the versioning: as it has not decidim nor decidim-core as dependencies, and to keep it easy to work with, we will not have the same versioning as the others gems. * About the ruby version: to make it possible to work with older decidim versions, we will support the lowest supported ruby version. +This is the reason why its in a different repository and not in the decidim repository. + The main scripts are `decidim-backporter`, `decidim-backports-checker`, `decidim-changelog-generator` and `decidim-releaser`. ### decidim-backporter @@ -47,6 +49,20 @@ After checking out the repo, run `bin/setup` to install dependencies. You can al To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org). +## Releases + +As this gem is meant to be used outside of the main decidim gems, we will not follow the same versioning. We will release a new version of this gem every time we have a new feature or bugfix that we need to use. This also means that we will not follow the same release process. + +To release this gem, follow these steps: + +. Bump the version number in `lib/decidim/maintainers_toolbox/version.rb` following [Semantic Versioning](https://semver.org/). +. Update the `CHANGELOG.md` with the new version and the changes. +. Commit the changes. +. Create a new tag with the version number. +. Push the changes and the tag to the repository. +. Run `rake build` to build the gem. +. Run `rake release` to publish the gem to [rubygems.org](https://rubygems.org). + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/decidim/decidim.