Skip to content

Commit 5a56d4c

Browse files
fix: 修正版本错误
1 parent 9198e33 commit 5a56d4c

11 files changed

+904
-844
lines changed

.github/workflows/release-drafter.yml

+19-18
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,41 @@ on:
77
name: Create Release And Upload assets
88

99
jobs:
10-
create-realese:
10+
create-release: # 修正了拼写错误
1111
name: Create Release
1212
runs-on: ubuntu-latest
1313
outputs:
1414
upload_url: ${{ steps.create_release.outputs.upload_url }}
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
18+
1819
- name: Get version
1920
id: get_version
2021
run: |
2122
TAG=$(basename ${GITHUB_REF})
22-
VERSION=${TAG/v/}
23-
echo "::set-output name=TAG::$TAG"
24-
echo "::set-output name=VERSION::$VERSION"
23+
echo "TAG=$TAG" >> $GITHUB_OUTPUT
24+
2525
- name: Create Release
2626
id: create_release
27-
uses: release-drafter/release-drafter@v5
27+
uses: release-drafter/release-drafter@v6
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3030
with:
3131
config-name: release-config.yml
3232
version: ${{ steps.get_version.outputs.TAG }}
3333
tag: ${{ steps.get_version.outputs.TAG }}
34-
35-
build-and-release:
36-
needs: create-realese
37-
name: Build and Release
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v2
41-
- name: Build it and upload
42-
uses: jumpserver/action-build-upload-assets@master
34+
35+
- name: Create Upload Assets
36+
run: |
37+
mkdir -p build jumpserver-installer-${{ steps.get_version.outputs.TAG }}
38+
git archive --format tar HEAD | tar x -C jumpserver-installer-${{ steps.get_version.outputs.TAG }}
39+
tar -czf build/jumpserver-installer-${{ steps.get_version.outputs.TAG }}.tar.gz jumpserver-installer-${{ steps.get_version.outputs.TAG }}
40+
cd build
41+
md5sum jumpserver-installer-${{ steps.get_version.outputs.TAG }}.tar.gz > jumpserver-installer-${{ steps.get_version.outputs.TAG }}.tar.gz.md5
42+
43+
- name: Release Upload Assets
44+
run: |
45+
gh release upload ${{ steps.get_version.outputs.TAG }} build/* -R $GITHUB_REPOSITORY
4346
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
with:
46-
upload_url: ${{ needs.create-realese.outputs.upload_url }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cn-quick_start.sh

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ function get_installer() {
5050

5151
function config_installer() {
5252
cd /opt/jumpserver-installer-${VERSION} || exit 1
53-
sed -i "s/VERSION=.*/VERSION=${VERSION}/g" /opt/jumpserver-installer-${VERSION}/static.env
5453
sed -i "s/# DOCKER_IMAGE_MIRROR=1/DOCKER_IMAGE_MIRROR=1/g" /opt/jumpserver-installer-${VERSION}/config-example.txt
5554
./jmsctl.sh install
5655
./jmsctl.sh start

jmsctl.sh

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function usage() {
4545
echo
4646
echo "Installation Commands: "
4747
echo " install $(gettext 'Install JumpServer')"
48+
echo " upgrade $(gettext 'Upgrade JumpServer')"
4849
echo
4950
echo "Management Commands: "
5051
echo " config $(gettext 'Configuration Tools')"

0 commit comments

Comments
 (0)