-
Notifications
You must be signed in to change notification settings - Fork 11
81 lines (76 loc) · 2.58 KB
/
Copy pathrelease-dev.yml
File metadata and controls
81 lines (76 loc) · 2.58 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
name: 'Release: Dev'
on:
workflow_dispatch:
inputs:
version-prefix:
description: 'Version'
required: false
version-patch:
description: 'Patch number'
required: false
env:
solution: NClient.sln
release-type: dev
github-pkgs-source: https://nuget.pkg.github.com/nclient/index.json
jobs:
release:
environment: release-dev
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setting version-patch env variable
run: |
if [[ "${{ github.event.inputs.version-patch }}" != "" ]]; then
echo "version-patch=${{ github.event.inputs.version-patch }}" >> $GITHUB_ENV
else
echo "version-patch=${{ github.run_number }}" >> $GITHUB_ENV
fi
shell: bash
- id: release-info
name: Release info
uses: ./.github/actions/release-info
with:
release-type: ${{ env.release-type }}
version-prefix: ${{ github.event.inputs.version-prefix }}
version-patch: ${{ env.version-patch }}
- name: Push packaget to NuGet
uses: ./.github/actions/push
with:
solution: ${{ env.solution }}
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
source: ${{ env.github-pkgs-source }}
source-api-key: ${{ secrets.GITHUB_TOKEN }}
needsTag: false
validation:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setting version-patch env variable
run: |
if [[ "${{ github.event.inputs.version-patch }}" != "" ]]; then
echo "version-patch=${{ github.event.inputs.version-patch }}" >> $GITHUB_ENV
else
echo "version-patch=${{ github.run_number }}" >> $GITHUB_ENV
fi
shell: bash
- id: release-info
name: Release info
uses: ./.github/actions/release-info
with:
release-type: ${{ env.release-type }}
version-prefix: ${{ github.event.inputs.version-prefix }}
version-patch: ${{ env.version-patch }}
- name: Test release
uses: ./.github/actions/test-release
with:
solution: ${{ env.solution }}
version-prefix: ${{ steps.release-info.outputs.version-prefix }}
version-suffix: ${{ steps.release-info.outputs.version-suffix }}
delay: 30s
custom-source: ${{ env.github-pkgs-source }}
custom-source-user: nclient
custom-source-password: ${{ secrets.GITHUB_TOKEN }}