chore(ci): add pre-release specific & add latest tag

This commit is contained in:
郭桓桓 2023-03-03 19:52:31 +08:00
parent 24056e42d5
commit 188ac468fd
Signed by: kuohuanhuan
GPG Key ID: FD846A0A797B0D75
1 changed files with 24 additions and 9 deletions

View File

@ -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.