Skip to content

Commit

Permalink
fix: ci-release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mahabubx7 committed Oct 15, 2024
1 parent 8948a77 commit bc1a422
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release

on:
push:
tags:
- "v*.*.*"
branches:
- main

jobs:
release:
Expand All @@ -22,26 +22,11 @@ jobs:
- name: Install dependencies
run: npm install

- name: Run release script
- name: Run release-it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PA_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
run: npx release-it

- name: Update CHANGELOG.md
run: |
Expand All @@ -51,4 +36,4 @@ jobs:
git commit -m 'Update CHANGELOG.md'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PA_TOKEN }}
Empty file added CHANGELOG.md
Empty file.

0 comments on commit bc1a422

Please sign in to comment.