Skip to content

Commit 1851dba

Browse files
Merge pull request #42 from mxenabled/bm/auto_release
Auto release
2 parents 1d0f711 + 7de1002 commit 1851dba

File tree

5 files changed

+31
-4
lines changed

5 files changed

+31
-4
lines changed

.github/read_version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require "yaml"
2+
config = ::YAML.load(File.read("openapi/config.yml"))
3+
puts config["gemVersion"]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: RubyGems Release
1+
name: Publish
22

33
on:
44
push:
55
branches: [ master ]
66

77
jobs:
8-
Release:
8+
Publish:
99
name: Release to RubyGems
1010
runs-on: ubuntu-latest
1111
permissions:

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
Release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Ruby
13+
uses: ruby/setup-ruby@v1
14+
with:
15+
bundler-cache: true
16+
ruby-version: 3.1
17+
- name: Read version
18+
id: read_version
19+
run: echo "::set-output name=version::$(ruby .github/read_version.rb)"
20+
- name: Create tag and release
21+
run: |
22+
gh release create "v${{ steps.read_version.outputs.version }}"
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lib/mx-platform-ruby/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module MxPlatformRuby
14-
VERSION = '0.8.0'
14+
VERSION = '0.8.1'
1515
end

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ gemHomepage: "https://github.com/mxenabled/mx-platform-ruby"
66
gemLicense: "MIT"
77
gemName: "mx-platform-ruby"
88
gemRequiredRubyVersion: ">= 2.6"
9-
gemVersion: "0.8.0"
9+
gemVersion: "0.8.1"
1010
library: "faraday"
1111
moduleName: "MxPlatformRuby"

0 commit comments

Comments
 (0)