Skip to content

Commit

Permalink
chore: created new release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Herbert Kavuma committed Oct 2, 2024
1 parent 174f355 commit 1e4a887
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

# This will trigger the workflow both on a push to main and when a pull request is merged into main.
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

# Run release-it to publish package to npm and create a GitHub release
- name: Publish package and create GitHub release
run: npx release-it --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "v${version}",
"requireCleanWorkingDir": true
"requireCleanWorkingDir": true,
"tagAnnotation": "Release v${version}"
},
"npm": {
"publish": true,
"access": "public"
},
"github": {
"release": true
"release": true,
"releaseName": "Release v${version}"
},
"plugins": {
"@release-it/conventional-changelog": {
Expand Down

0 comments on commit 1e4a887

Please sign in to comment.