From 040f1fcbb8f23b8acc1d510d2ff529b092dd339a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Mon, 27 Dec 2021 12:10:05 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=B7=BB=E5=8A=A0=20quick=5Fstart.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-drafter.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index e50aae839..25f21a6f4 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -20,6 +20,8 @@ jobs: run: | TAG=$(basename ${GITHUB_REF}) VERSION=${TAG/v/} + wget https://raw.githubusercontent.com/jumpserver/installer/v${VERSION}/quick_start.sh + sed -i "s@Version=.*@Version=v${VERSION}@g" quick_start.sh echo "::set-output name=TAG::$TAG" echo "::set-output name=VERSION::$VERSION" - name: Create Release @@ -31,6 +33,16 @@ jobs: config-name: release-config.yml version: ${{ steps.get_version.outputs.TAG }} tag: ${{ steps.get_version.outputs.TAG }} + - name: Upload Quick Start Script + id: upload-release-quick-start-shell + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./quick_start.sh + asset_name: quick_start.sh + asset_content_type: application/text build-and-release: needs: create-realese @@ -43,4 +55,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create-realese.outputs.upload_url }} \ No newline at end of file + upload_url: ${{ needs.create-realese.outputs.upload_url }}