-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (79 loc) · 3.31 KB
/
ki_devops3_build.yml
File metadata and controls
101 lines (79 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# This is a basic workflow to help you get started with Actions
name: ki_devops3_build
# Controls when the action will run.
on:
#push:
# Triggers the workflow on push events for the branches start with release
#branches:: [ 'release/**' ]
# Triggers the workflow on push events but only for the master branch
#branches: [ master ]
# Triggers the workflow on push tag
#tags: ['*']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
merge_group:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "devops3_test"
devops3_test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Runs a set of commands using the runners shell
- name: Run test
run: |
set -e
echo call ./Publish/DevOps3/build-bash/10.Test.bash to test
cd ./Publish/DevOps3/build-bash
bash 10.Test.bash;
echo run test succeed!
# This workflow contains a single job called "devops3_build"
devops3_build:
# Requiring successful dependent jobs
needs: devops3_test
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Runs a set of commands using the runners shell
- name: Run build
run: |
set -e
echo call ./Publish/DevOps3/github-bash/startup.bash to build
export DOCKER_ImagePrefix="serset/"
export DOCKER_USERNAME="${{ secrets.DOCKER_USERNAME }}"
export DOCKER_PASSWORD="${{ secrets.DOCKER_PASSWORD }}"
export NUGET_SERVER="${{ secrets.NUGET_SERVER }}"
export NUGET_KEY="${{ secrets.NUGET_KEY }}"
export WebDav_BaseUrl="${{ secrets.WebDav_BaseUrl }}"
export WebDav_User="${{ secrets.WebDav_User }}"
cd ./Publish/DevOps3/github-bash
bash startup.bash
echo build succeed!
# echo "appName=${APPNAME}" >> $GITHUB_ENV
- name: release_create
id: release_create
uses: actions/create-release@v1
#if: hashFiles(env.release_assetPath)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{ env.release_name }}
tag_name: ${{ env.release_tag }}
draft: ${{ env.release_draft }}
prerelease: ${{ env.release_prerelease }}
body: ${{ env.release_body }}
# release_upload_asset
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_create.outputs.upload_url }}
asset_path: ${{ env.release_dirPath }}/${{ env.appName }}-nuget-${{ env.release_version }}.zip
asset_name: ${{ env.appName }}-nuget-${{ env.release_version }}.zip
asset_content_type: application/zip