chore(ci): add pre-release specific & add latest tag
This commit is contained in:
parent
24056e42d5
commit
188ac468fd
|
@ -41,18 +41,33 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.NPM_TOKEN }}
|
token: ${{ secrets.NPM_TOKEN }}
|
||||||
# Step VII
|
# 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
|
- name: Generate Changelog
|
||||||
run: npx changelogithub@0.12
|
run: npx changelogithub@0.12
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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.
|
# Authored by @kuohuanhuan.
|
||||||
|
|
Loading…
Reference in New Issue