Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish on tag in CI #91

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'

jobs:
publish:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4

- name: Build
run: gem build fluent-plugin-sumologic_output.gemspec
- name: Publish
env:
GEM_HOST_API_KEY: ${{ secrets.RUGYGEMS_APIKEY }}
run: gem push fluent-plugin-sumologic_output-*.gem
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing

## How to release

1. Create a pull request named `chore: release x.y.z` with the following changes:

- Set `gem.version` to `"x.y.z"` in [fluent-plugin-sumologic_output.gemspec](fluent-plugin-sumologic_output.gemspec).
- Add new version to [CHANGELOG.md](./CHANGELOG.md).

2. Create and push the release tag:

```bash
git checkout main
git pull
export VERSION=x.y.z
git tag -a "v${VERSION}" -m "Release v${VERSION}"
git push origin "v${VERSION}"
```

This will trigger the GitHub Actions [publish](./.github/workflows/publish.yaml) action to pubilsh the gem in Ruby Gems.

3. Go to https://github.com/SumoLogic/fluentd-output-sumologic/releases and create a new release for the tag.
Copy the changes from Changelog and publish the release.
2 changes: 1 addition & 1 deletion fluent-plugin-sumologic_output.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |gem|
gem.name = "fluent-plugin-sumologic_output"
gem.version = "0.0.0"
gem.version = "1.8.0"
gem.authors = ["Steven Adams", "Frank Reno"]
gem.email = ["[email protected]", "[email protected]"]
gem.description = %q{Output plugin to SumoLogic HTTP Endpoint}
Expand Down