From 93fd1323edbda6513211c42dd64c2234a4000605 Mon Sep 17 00:00:00 2001 From: Alexande B Date: Tue, 18 Jun 2024 21:53:04 +0200 Subject: [PATCH] #5 add GHA workflows --- .github/workflows/main.yml | 27 --------------------------- .github/workflows/rake.yml | 15 +++++++++++++++ .github/workflows/release.yml | 25 +++++++++++++++++++++++++ .rubocop.yml | 14 ++++++++------ 4 files changed, 48 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/rake.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 3a4835a..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Ruby - -on: - push: - branches: - - main - - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - name: Ruby ${{ matrix.ruby }} - strategy: - matrix: - ruby: - - '3.2.2' - - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - name: Run the default task - run: bundle exec rake diff --git a/.github/workflows/rake.yml b/.github/workflows/rake.yml new file mode 100644 index 0000000..b13a247 --- /dev/null +++ b/.github/workflows/rake.yml @@ -0,0 +1,15 @@ +# Auto-generated by Cimas: Do not edit it manually! +# See https://github.com/metanorma/cimas +name: rake + +on: + push: + branches: [ master, main ] + tags: [ v* ] + pull_request: + +jobs: + rake: + uses: metanorma/ci/.github/workflows/generic-rake.yml@main + secrets: + pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7779003 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +# Auto-generated by Cimas: Do not edit it manually! +# See https://github.com/metanorma/cimas +name: release + +on: + workflow_dispatch: + inputs: + next_version: + description: | + Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc). + Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version + required: true + default: 'skip' + repository_dispatch: + types: [ do-release ] + +jobs: + release: + uses: metanorma/ci/.github/workflows/rubygems-release.yml@main + with: + next_version: ${{ github.event.inputs.next_version }} + secrets: + rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }} + pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} + diff --git a/.rubocop.yml b/.rubocop.yml index 762eebb..be91060 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,10 @@ -AllCops: - TargetRubyVersion: 3.0 +# Auto-generated by Cimas: Do not edit it manually! +# See https://github.com/metanorma/cimas +inherit_from: + - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml -Style/StringLiterals: - EnforcedStyle: double_quotes +# local repo-specific modifications +# ... -Style/StringLiteralsInInterpolation: - EnforcedStyle: double_quotes +AllCops: + TargetRubyVersion: 3.4