Skip to content

Commit 42f7832

Browse files
authored
Merge pull request #39 from HardNorth/develop
Release
2 parents 996e8c5 + 8ad52d7 commit 42f7832

9 files changed

Lines changed: 7574 additions & 1095 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,28 @@ name: CI Build
33
on:
44
push:
55
branches:
6-
- '*'
7-
- '!main'
6+
- '*'
7+
- '!main'
88
paths-ignore:
9-
- README.md
10-
- CHANGELOG.md
9+
- README.md
10+
- CHANGELOG.md
1111

1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
18-
- name: Set up Node.js
19-
uses: actions/setup-node@v1
20-
with:
21-
node-version: 12.x
22-
- name: Install dependencies
23-
run: npm ci
24-
- name: Test with Jest
25-
run: npm run test
26-
- name: Build with npm
27-
run: npm run build
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 16
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
- name: Test with Jest
28+
run: npm run test
29+
- name: Build with npm
30+
run: npm run build

.github/workflows/release.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,22 @@ jobs:
2626

2727
steps:
2828
# Prepare
29-
- uses: actions/checkout@v2
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
- name: Set up Node.js
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 16
3036

3137
- name: Setup git credentials
3238
run: |
3339
git config user.name 'Vadzim Hushchanskou'
3440
git config user.email 'vadzim.hushchanskou@gmail.com'
3541
git config user.password ${{ secrets.GITHUB_TOKEN }}
3642
37-
- name: Set up Node.js
38-
uses: actions/setup-node@v1
39-
with:
40-
node-version: 12.x
41-
4243
- name: Generate versions
43-
uses: HardNorth/github-version-generate@v1.1.2
44+
uses: HardNorth/github-version-generate@v1.2.0
4445
with:
4546
version-source: file
4647
version-file: ${{ env.VERSION_FILE }}
@@ -91,7 +92,18 @@ jobs:
9192
- name: Tagging new version
9293
id: newVersionTag
9394
run: |
94-
git tag -a v${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
95+
RELEASE_TAG="v${{ env.RELEASE_VERSION }}"
96+
MINOR_TAG="v${{ env.RELEASE_VERSION_MAJOR }}.${{ env.RELEASE_VERSION_MINOR }}"
97+
MAJOR_TAG="v${{ env.RELEASE_VERSION_MAJOR }}"
98+
99+
git tag -d "${MINOR_TAG}" || true
100+
git tag -d "${MAJOR_TAG}" || true
101+
git push origin ":${MINOR_TAG}" || true
102+
git push origin ":${MAJOR_TAG}" || true
103+
104+
git tag -a "${RELEASE_TAG}" -m "Release ${{ env.RELEASE_VERSION }}"
105+
git tag -a "${MINOR_TAG}" -m "Tag latest minor version"
106+
git tag -a "${MAJOR_TAG}" -m "Tag latest major version"
95107
git push --tags
96108
97109
- name: Read changelog Entry
@@ -115,7 +127,7 @@ jobs:
115127

116128
- name: Checkout develop branch
117129
if: ${{github.ref}} == 'main'
118-
uses: actions/checkout@v2
130+
uses: actions/checkout@v3
119131
with:
120132
ref: 'develop'
121133
fetch-depth: 0

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Changed
5+
- NodeJS version updated on 16, by @HardNorth
6+
- `@actions/core` and `@actions/github` versions updated on 1.10.0 and 5.1.1 respectively, by @HardNorth
7+
- Minor version updated on `1.3`, by @HardNorth
48

59
## [1.2.0]
610
### Added
@@ -17,7 +21,7 @@
1721

1822
## [1.1.1]
1923
### Changed
20-
- Some inderect dependencies were updated by dependabot
24+
- Some indirect dependencies were updated by dependabot
2125

2226
## [1.1.0]
2327
### Added

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
![CI Build](https://github.com/HardNorth/github-version-generate/workflows/CI%20Build/badge.svg?branch=master)
44
[![License](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)](https://opensource.org/licenses/Apache-2.0)
55

6+
> Please star this repository if you like the application, it will help more people see it. Thank you!
7+
68
A GitHub action for reading, bumping, generating, formatting applications versions in release pipelines.
79
Outputs three environment / output variables:
810

README_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
![CI Build](https://github.com/HardNorth/github-version-generate/workflows/CI%20Build/badge.svg?branch=master)
44
[![License](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)](https://opensource.org/licenses/Apache-2.0)
55

6+
> Please star this repository if you like the application, it will help more people see it. Thank you!
7+
68
A GitHub action for reading, bumping, generating, formatting applications versions in release pipelines.
79
Outputs three environment / output variables:
810

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ outputs:
153153
description: 'A version prepared for pushing into a repository instead of "CURRENT_VERSION" after release, usually incremented by 1'
154154

155155
runs:
156-
using: 'node12'
156+
using: 'node16'
157157
main: 'build/index.js'

0 commit comments

Comments
 (0)