From f0f662f9069c70a39cd23ed5f742cd3a4c3a2167 Mon Sep 17 00:00:00 2001 From: Guilherme Minozzi Date: Wed, 20 Mar 2024 17:30:46 -0300 Subject: [PATCH] feat: use gh actions to create release --- .github/workflows/publish.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f22402b..f8c7a38 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,21 +35,15 @@ jobs: restore-keys: | ${{ runner.os }}-node-modules- - - name: Tag Name - id: set_tag - run: | - echo ::set-output name=tag::$(git describe HEAD --abbrev=0) - - - name: Create Release - uses: actions/create-release@v1 + - name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_name: Release ${{ steps.tag.outputs.tag }} - tag_name: ${{ steps.tag.outputs.tag }} - body_path: CHANGELOG.md - draft: false - prerelease: false + tag: ${{ github.ref_name }} + run: | + gh release create "$tag" \ + --repo="$GITHUB_REPOSITORY" \ + --title="Release ${tag#v}" \ + --notes-file CHANGELOG.md - name: Login to npm run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc