mirror of
https://github.com/octopusYan/alist-gui.git
synced 2024-09-20 07:56:18 +08:00
ci: fix
This commit is contained in:
parent
325b838a4f
commit
e7a6f45814
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@ -24,6 +24,17 @@ jobs:
|
|||||||
path: temp
|
path: temp
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
|
- name: Fetch history
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/pull/') }}
|
||||||
|
run: |
|
||||||
|
git init
|
||||||
|
cp $GITHUB_WORKSPACE/temp/.git/config ./.git
|
||||||
|
rm -rf $GITHUB_WORKSPACE/temp
|
||||||
|
# git config remote.origin.fetch '+refs/*:refs/*'
|
||||||
|
git fetch --filter=tree:0 # --update-head-ok
|
||||||
|
git reset --hard origin/$(git branch --show-current) || true
|
||||||
|
git checkout ${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Set tag
|
- name: Set tag
|
||||||
id: set_tag
|
id: set_tag
|
||||||
run: |
|
run: |
|
||||||
@ -31,6 +42,16 @@ jobs:
|
|||||||
echo tag=$(git describe --tags --match "v*" ${{ github.ref }} || git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT
|
echo tag=$(git describe --tags --match "v*" ${{ github.ref }} || git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT
|
||||||
exit ${PIPESTATUS[0]}
|
exit ${PIPESTATUS[0]}
|
||||||
|
|
||||||
|
- name: Judge pre-release
|
||||||
|
id: set_pre
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
run: |
|
||||||
|
if [[ '${{ steps.set_tag.outputs.tag }}' =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo prerelease=false | tee -a $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo prerelease=true | tee -a $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user