Skip to content

Commit 3d8866f

Browse files
Merge pull request #28 from mxenabled/bm/auto_release
Auto Release
2 parents dfb3ac3 + 1522581 commit 3d8866f

File tree

7 files changed

+33
-6
lines changed

7 files changed

+33
-6
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["artifactVersion"]

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [master]
66

77
jobs:
8-
build:
8+
Publish:
99
runs-on: ubuntu-latest
1010

1111
steps:

.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 }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mvn clean package
2424
```
2525

2626
Then manually install the following JARs:
27-
- `target/mx-platform-java-0.5.0.jar`
27+
- `target/mx-platform-java-0.5.1.jar`
2828
- `target/lib/*.jar`
2929

3030
### Maven users
@@ -35,7 +35,7 @@ Add this dependency to your project's POM:
3535
<dependency>
3636
<groupId>com.mx</groupId>
3737
<artifactId>mx-platform-java</artifactId>
38-
<version>0.5.0</version>
38+
<version>0.5.1</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
```

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiPackage: "com.mx.client.mx-platform-api"
22
artifactDescription: "A Java library for the MX Platform API"
33
artifactId: "mx-platform-java"
44
artifactUrl: "https://github.com/mxenabled/mx-platform-java"
5-
artifactVersion: 0.5.0
5+
artifactVersion: 0.5.1
66
developerEmail: "devexperience@mx.com"
77
developerName: "MX"
88
developerOrganization: "MX Technologies Inc."

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>mx-platform-java</artifactId>
66
<packaging>jar</packaging>
77
<name>mx-platform-java</name>
8-
<version>0.5.0</version>
8+
<version>0.5.1</version>
99
<url>https://github.com/mxenabled/mx-platform-java</url>
1010
<description>A Java library for the MX Platform API</description>
1111
<scm>

src/main/java/com/mx/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void init() {
131131
json = new JSON();
132132

133133
// Set default User-Agent.
134-
setUserAgent("OpenAPI-Generator/0.5.0/java");
134+
setUserAgent("OpenAPI-Generator/0.5.1/java");
135135

136136
authentications = new HashMap<String, Authentication>();
137137
}

0 commit comments

Comments
 (0)