Add documentation and namespace properly #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }}-release | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
permissions: | |
checks: write | |
contents: write | |
uses: ./.github/workflows/lint.yml | |
test: | |
uses: ./.github/workflows/test.yml | |
version: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_ONLY: ci | |
needs: [lint, test] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Set up Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: 3.2.2 | |
bundler-cache: true | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v42 | |
with: | |
files: "lib/jmeter_perf/version.rb" | |
- name: Bump Patch Version | |
id: semver | |
if: steps.changed-files.outputs.any_changed == 'false' | |
run: | | |
bundle exec bump patch --no-commit | |
echo "semver=$(bundle exec bump current)" >> $GITHUB_OUTPUT | |
- name: Commit Version Bump | |
if: steps.changed-files.outputs.any_changed == 'false' | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: "lib/jmeter_perf/version.rb" | |
default_author: github_actions | |
message: "Bump version to ${{ steps.semver.outputs.semver }}" | |
release: | |
name: Release gem to RubyGems.org | |
needs: [version] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Set up Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: 3.2.2 | |
bundler-cache: true | |
- uses: rubygems/release-gem@v1 |