Browse Source

perf: 添加 quick_start.sh

pull/7442/head
吴小白 3 years ago committed by Jiangjie.Bai
parent
commit
040f1fcbb8
  1. 14
      .github/workflows/release-drafter.yml

14
.github/workflows/release-drafter.yml

@ -20,6 +20,8 @@ jobs:
run: | run: |
TAG=$(basename ${GITHUB_REF}) TAG=$(basename ${GITHUB_REF})
VERSION=${TAG/v/} 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=TAG::$TAG"
echo "::set-output name=VERSION::$VERSION" echo "::set-output name=VERSION::$VERSION"
- name: Create Release - name: Create Release
@ -31,6 +33,16 @@ jobs:
config-name: release-config.yml config-name: release-config.yml
version: ${{ steps.get_version.outputs.TAG }} version: ${{ steps.get_version.outputs.TAG }}
tag: ${{ 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: build-and-release:
needs: create-realese needs: create-realese
@ -43,4 +55,4 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ needs.create-realese.outputs.upload_url }} upload_url: ${{ needs.create-realese.outputs.upload_url }}

Loading…
Cancel
Save