Skip to content

Commit 176bd95

Browse files
Merge pull request #6 from mxenabled/bm/auto_release
Auto release
2 parents 63d1425 + bb8454a commit 176bd95

7 files changed

Lines changed: 38 additions & 11 deletions

File tree

.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["packageVersion"]

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

MX.Platform.CSharp.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
33
VisualStudioVersion = 14.0.25420.1
44
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MX.Platform.CSharp", "src\MX.Platform.CSharp\MX.Platform.CSharp.csproj", "{C73FE653-09BF-429D-9090-6A5D2F5256A3}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MX.Platform.CSharp", "src\MX.Platform.CSharp\MX.Platform.CSharp.csproj", "{FC323351-A19D-4C8E-B5EE-643ED4CE5BEB}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MX.Platform.CSharp.Test", "src\MX.Platform.CSharp.Test\MX.Platform.CSharp.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Global
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{C73FE653-09BF-429D-9090-6A5D2F5256A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{C73FE653-09BF-429D-9090-6A5D2F5256A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{C73FE653-09BF-429D-9090-6A5D2F5256A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{C73FE653-09BF-429D-9090-6A5D2F5256A3}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{FC323351-A19D-4C8E-B5EE-643ED4CE5BEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{FC323351-A19D-4C8E-B5EE-643ED4CE5BEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{FC323351-A19D-4C8E-B5EE-643ED4CE5BEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{FC323351-A19D-4C8E-B5EE-643ED4CE5BEB}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
packageName: MX.Platform.CSharp
2-
packageVersion: 0.3.0
2+
packageVersion: 0.3.1

src/MX.Platform.CSharp/Client/Configuration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class Configuration : IReadableConfiguration
3131
/// Version of the package.
3232
/// </summary>
3333
/// <value>Version of the package.</value>
34-
public const string Version = "0.3.0";
34+
public const string Version = "0.3.1";
3535

3636
/// <summary>
3737
/// Identifier for ISO 8601 DateTime Format
@@ -101,7 +101,7 @@ public class Configuration : IReadableConfiguration
101101
public Configuration()
102102
{
103103
Proxy = null;
104-
UserAgent = "OpenAPI-Generator/0.3.0/csharp";
104+
UserAgent = "OpenAPI-Generator/0.3.1/csharp";
105105
BasePath = "https://api.mx.com";
106106
DefaultHeaders = new ConcurrentDictionary<string, string>();
107107
ApiKey = new ConcurrentDictionary<string, string>();
@@ -452,7 +452,7 @@ public static string ToDebugReport()
452452
report += " OS: " + System.Environment.OSVersion + "\n";
453453
report += " .NET Framework Version: " + System.Environment.Version + "\n";
454454
report += " Version of the API: 0.1.0\n";
455-
report += " SDK Package Version: 0.3.0\n";
455+
report += " SDK Package Version: 0.3.1\n";
456456

457457
return report;
458458
}

src/MX.Platform.CSharp/MX.Platform.CSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Description>A library generated from a OpenAPI doc</Description>
1313
<Copyright>No Copyright</Copyright>
1414
<RootNamespace>MX.Platform.CSharp</RootNamespace>
15-
<Version>0.3.0</Version>
15+
<Version>0.3.1</Version>
1616
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\MX.Platform.CSharp.xml</DocumentationFile>
1717
<RepositoryUrl>https://github.com/GIT_USER_ID/GIT_REPO_ID.git</RepositoryUrl>
1818
<RepositoryType>git</RepositoryType>

0 commit comments

Comments
 (0)