Skip to content

Commit 498e457

Browse files
Merge pull request #10 from AlexRogalskiy/master
sync: master to main
2 parents 6bcf6d1 + c5b896a commit 498e457

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

.github/workflows/changelog.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
jobs:
10+
build:
11+
name: Create Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Get version from tag
15+
id: tag_name
16+
run: |
17+
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
18+
shell: bash
19+
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Create Changelog
24+
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
25+
with:
26+
output: ./CHANGELOG.md
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Get Changelog Entry
30+
id: changelog_reader
31+
uses: mindsers/changelog-reader-action@v2
32+
with:
33+
version: ${{ steps.tag_name.outputs.current_version }}
34+
path: ./CHANGELOG.md
35+
36+
- name: Create Release
37+
id: create_release
38+
uses: actions/create-release@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
# This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object.
43+
# See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
44+
tag_name: ${{ steps.changelog_reader.outputs.version }}
45+
release_name: Release ${{ steps.changelog_reader.outputs.version }}
46+
body: ${{ steps.changelog_reader.outputs.changes }}
47+
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
48+
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}

.github/workflows/version-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Commit update
2323
uses: stefanzweifel/git-auto-commit-action@v4
2424
with:
25-
branch: main
25+
branch: master
2626
skip_dirty_check: true
2727
commit_message: 'Update VERSION'
2828
commit_options: '--no-verify --signoff'

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "v1.0"
1+
VERSION = "v1.2"

0 commit comments

Comments
 (0)