action-ki_multibranch.yml 2.6 KB

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