Skip to content

Commit ae0d60e

Browse files
ci: publish on tag in CI (#91)
1 parent 0f8f5c8 commit ae0d60e

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
- '[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
8+
- '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
9+
- '[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-20.04
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Build
19+
run: gem build fluent-plugin-sumologic_output.gemspec
20+
- name: Publish
21+
env:
22+
GEM_HOST_API_KEY: ${{ secrets.RUGYGEMS_APIKEY }}
23+
run: gem push fluent-plugin-sumologic_output-*.gem

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Contributing
2+
3+
## How to release
4+
5+
1. Create a pull request named `chore: release x.y.z` with the following changes:
6+
7+
- Set `gem.version` to `"x.y.z"` in [fluent-plugin-sumologic_output.gemspec](fluent-plugin-sumologic_output.gemspec).
8+
- Add new version to [CHANGELOG.md](./CHANGELOG.md).
9+
10+
2. Create and push the release tag:
11+
12+
```bash
13+
git checkout main
14+
git pull
15+
export VERSION=x.y.z
16+
git tag -a "v${VERSION}" -m "Release v${VERSION}"
17+
git push origin "v${VERSION}"
18+
```
19+
20+
This will trigger the GitHub Actions [publish](./.github/workflows/publish.yaml) action to pubilsh the gem in Ruby Gems.
21+
22+
3. Go to https://github.com/SumoLogic/fluentd-output-sumologic/releases and create a new release for the tag.
23+
Copy the changes from Changelog and publish the release.

fluent-plugin-sumologic_output.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
44

55
Gem::Specification.new do |gem|
66
gem.name = "fluent-plugin-sumologic_output"
7-
gem.version = "0.0.0"
7+
gem.version = "1.8.0"
88
gem.authors = ["Steven Adams", "Frank Reno"]
99
1010
gem.description = %q{Output plugin to SumoLogic HTTP Endpoint}

0 commit comments

Comments
 (0)