ki_devops3_release.yml 2.7 KB

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