Skip to content

Commit

Permalink
ci: improve the release process (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar committed Sep 11, 2023
1 parent 4cb2f1e commit 46077d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
name: Release
run-name: Release ${{ github.event.inputs.version }} version
name: release

on:
workflow_dispatch:
inputs:
version:
type: choice
description: Version
options:
- patch
- minor
- major

jobs:
publish-npm:
Expand All @@ -20,6 +11,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
Expand All @@ -35,7 +28,7 @@ jobs:
- name: Install release-it globally
run: |
npm i -g release-it
npm i -g @release-it/keep-a-changelog
npm i -g @release-it/conventional-changelog
- name: git config
run: |
Expand All @@ -46,6 +39,6 @@ jobs:
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}

- name: Bump version
run: npx release-it --increment ${{ github.event.inputs.version }} --ci -V
run: npx release-it --increment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 6 additions & 4 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
"publish": true
},
"plugins": {
"@release-it/keep-a-changelog": {
"filename": "CHANGELOG.md",
"addUnreleased": false,
"keepUnreleased": false
"@release-it/conventional-changelog": {
"preset": {
"name": "angular"
},
"infile": "CHANGELOG.md",
"header": "# Change Log"
}
}
}
13 changes: 2 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 0.1.0 (2023-09-04)

## [0.1.0] - 2023-09-04

#### Added

- First public release.

## [0.0.0]

Init
Initial release

0 comments on commit 46077d3

Please sign in to comment.