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 authored Sep 11, 2023
1 parent 4cb2f1e commit 269d8ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
name: Release
run-name: Release ${{ github.event.inputs.version }} version
run-name: Release a new version

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

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

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

- uses: actions/setup-node@v3
with:
Expand All @@ -35,7 +29,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 +40,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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 3 additions & 4 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
"publish": true
},
"plugins": {
"@release-it/keep-a-changelog": {
"filename": "CHANGELOG.md",
"addUnreleased": false,
"keepUnreleased": false
"@release-it/conventional-changelog": {
"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 269d8ca

Please sign in to comment.