mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
Update release.yml
This commit is contained in:
parent
9124abee7f
commit
63c8d71f91
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@ -5,6 +5,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- dev
|
||||||
paths:
|
paths:
|
||||||
- "version.json"
|
- "version.json"
|
||||||
|
|
||||||
@ -24,9 +25,13 @@ jobs:
|
|||||||
version_core=${version%%-*}
|
version_core=${version%%-*}
|
||||||
echo "VERSION=$version" >> $GITHUB_OUTPUT
|
echo "VERSION=$version" >> $GITHUB_OUTPUT
|
||||||
echo "VERSION_CORE=$version_core" >> $GITHUB_OUTPUT
|
echo "VERSION_CORE=$version_core" >> $GITHUB_OUTPUT
|
||||||
if [[ $version == *-* ]]; then
|
|
||||||
echo "rc release version"
|
if [[ $GITHUB_REF == *"refs/heads/dev"* ]]; then
|
||||||
|
echo "dev branch detected"
|
||||||
echo "CHANNEL=dev" >> $GITHUB_OUTPUT
|
echo "CHANNEL=dev" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ $version == *-* ]]; then
|
||||||
|
echo "rc release version"
|
||||||
|
echo "CHANNEL=rc" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "release version"
|
echo "release version"
|
||||||
echo "CHANNEL=release" >> $GITHUB_OUTPUT
|
echo "CHANNEL=release" >> $GITHUB_OUTPUT
|
||||||
@ -71,6 +76,7 @@ jobs:
|
|||||||
destination-dir: ./${{ steps.convert_version.outputs.CHANNEL }}/websoft9
|
destination-dir: ./${{ steps.convert_version.outputs.CHANNEL }}/websoft9
|
||||||
|
|
||||||
- name: Create Github Release
|
- name: Create Github Release
|
||||||
|
if: github.ref == 'refs/heads/main' # 仅在 main 分支上触发
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
@ -84,6 +90,7 @@ jobs:
|
|||||||
|
|
||||||
pages:
|
pages:
|
||||||
name: Build Github Pages
|
name: Build Github Pages
|
||||||
|
if: github.ref == 'refs/heads/main' # 仅在 main 分支上触发
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pages: write
|
pages: write
|
||||||
|
Loading…
Reference in New Issue
Block a user