diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7e3194..0a83139 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,18 +41,33 @@ jobs: with: token: ${{ secrets.NPM_TOKEN }} # Step VII - - name: GitHub Release - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - prerelease: false - files: | - dist/* - build.tar.gz - # Step VIII - name: Generate Changelog run: npx changelogithub@0.12 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Step VIII + # - Pre-release + - name: GitHub Release + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') + uses: softprops/action-gh-release@v1 + with: + prerelease: true + files: | + dist/* + build.zip + # - Release + - name: GitHub Release + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') == false + uses: softprops/action-gh-release@v1 + with: + prerelease: false + files: | + dist/* + build.zip + - name: Add Latest Tag + uses: cardinalby/git-tag-action@v1 + env: + TAG: Latest + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Authored by @kuohuanhuan.