From bc1a42291a121ed80319649a5b1efca64090e4a0 Mon Sep 17 00:00:00 2001 From: Mahabub Date: Tue, 15 Oct 2024 14:40:49 +0600 Subject: [PATCH] fix: ci-release workflow --- .github/workflows/release.yml | 27 ++++++--------------------- CHANGELOG.md | 0 2 files changed, 6 insertions(+), 21 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43006a6..a23414f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: Release on: push: - tags: - - "v*.*.*" + branches: + - main jobs: release: @@ -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: | @@ -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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29