Skip to content

Commit f514757

Browse files
author
Juli Ovechkina
authored
ci: add workflow for release 1.x.x (#242)
* ci: add workflow for release 1.x.x
1 parent e4ea4a9 commit f514757

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release version 1.x.x. fix
2+
3+
description: |
4+
Organizes CI/CD pipeline for branch with fixes for major version 1.x.x (version-1.x.x/fixes) - generate Changelog and bump version automatically,
5+
create a release PR which once merged results in creating a new GitHub release and publishing a new version of NPM
6+
package
7+
8+
on:
9+
push:
10+
branches: [version-1.x.x/fixes]
11+
12+
inputs:
13+
github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
14+
npm-token: ${{ secrets.GRAVITY_UI_BOT_NPM_TOKEN }}
15+
node-version: 14
16+
17+
jobs:
18+
release:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ inputs.node-version }}
25+
registry-url: 'https://registry.npmjs.org'
26+
- run: npm ci
27+
shell: bash
28+
- run: npm test
29+
shell: bash
30+
- uses: codex-team/action-nodejs-package-info@v1
31+
id: package
32+
- uses: google-github-actions/release-please-action@v3
33+
id: release
34+
with:
35+
token: ${{ inputs.github-token }}
36+
release-type: node
37+
package-name: ${{ steps.package.outputs.name }}
38+
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"perf","section":"Performance Improvements","hidden":false}]'
39+
bump-minor-pre-major: true
40+
default-branch: ${{ inputs.default-branch }}
41+
- run: npm publish --tag untagged --access public
42+
env:
43+
NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
44+
if: ${{ steps.release.outputs.release_created }}
45+
shell: bash

0 commit comments

Comments
 (0)