Skip to content

Commit 4b7269d

Browse files
Merge pull request #16 from mxenabled/bm/auto_release
Auto release
2 parents d6de1be + 2292489 commit 4b7269d

6 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["npmVersion"]

.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
steps:
1111
- uses: actions/checkout@v2

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

openapi/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
npmName: "mx-platform-node"
2-
npmVersion: 0.6.0
2+
npmVersion: 0.6.1
33
supportsES6: true

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mx-platform-node",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "A Node library for the MX Platform API.",
55
"author": "MX",
66
"keywords": [

0 commit comments

Comments
 (0)