1+ # This is a basic workflow to help you get started with Actions
2+
3+ name : CI
4+
5+ # Controls when the action will run.
6+ on :
7+
8+ push :
9+ # Triggers the workflow on push events but only for the master branch
10+ # branches: [ master ]
11+
12+ # Triggers the workflow on push tag
13+ tags : ['*']
14+
15+ # Allows you to run this workflow manually from the Actions tab
16+ workflow_dispatch :
17+
18+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+ jobs :
20+ # This workflow contains a single job called "build"
21+ build :
22+ # The type of runner that the job will run on
23+ runs-on : ubuntu-latest
24+
25+ # Steps represent a sequence of tasks that will be executed as part of the job
26+ steps :
27+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28+ - uses : actions/checkout@v2
29+
30+ # Runs a set of commands using the runners shell
31+ - name : Run startup.bash
32+ run : |
33+ set -e
34+ echo start build
35+ export NUGET_SERVER="${{ secrets.NUGET_SERVER }}"
36+ export NUGET_KEY="${{ secrets.NUGET_KEY }}"
37+ export GIT_SSH_SECRET="${{ secrets.GIT_SSH_SECRET }}"
38+ cd ./Publish/DevOps/github-bash
39+ bash startup.bash
40+ echo build succeed!
41+
42+ echo "appName=Vit.AspNetCore.WebSocket" >> $GITHUB_ENV
43+
44+
45+ - name : release_create
46+ id : release_create
47+ uses : actions/create-release@v1
48+ # if: hashFiles(env.release_assetPath)
49+ env :
50+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51+ with :
52+ release_name : ${{ env.release_name }}
53+ tag_name : ${{ env.release_tag }}
54+ draft : ${{ env.release_draft }}
55+ prerelease : ${{ env.release_prerelease }}
56+ body : ${{ env.release_body }}
57+
58+
59+ # release_upload_asset
60+
61+ - uses : actions/upload-release-asset@v1
62+ env :
63+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64+ with :
65+ upload_url : ${{ steps.release_create.outputs.upload_url }}
66+ asset_path : ${{ env.release_dirPath }}/${{ env.appName }}-nuget-${{ env.release_version }}.zip
67+ asset_name : ${{ env.appName }}-nuget-${{ env.release_version }}.zip
68+ asset_content_type : application/zip
0 commit comments