This repository was archived by the owner on Oct 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (88 loc) · 3.46 KB
/
createrelease.yml
File metadata and controls
111 lines (88 loc) · 3.46 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
102
103
104
105
106
107
108
109
110
111
name: Release
on:
release:
types: [published]
jobs:
buildrelease:
name: "Build Staging Release"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
lfs: 'true'
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Install Octopus CLI
run: |
sudo apt update && sudo apt install --no-install-recommends gnupg curl ca-certificates apt-transport-https && \
curl -sSfL https://apt.octopus.com/public.key | sudo apt-key add - && \
sudo sh -c "echo deb https://apt.octopus.com/ stable main > /etc/apt/sources.list.d/octopus.com.list" && \
sudo apt update && sudo apt install octopuscli
- name: Create the release zip
run: >-
octo pack
--outFolder /home/runner/work/PowerBIReporting/PowerBIReporting/Application
--basePath /home/runner/work/PowerBIReporting/PowerBIReporting/Application
--id PowerBIApplication
--version ${{ steps.get_version.outputs.VERSION }}
--format zip
--verbose
--logLevel=verbose
- name: Push Package to Octopus
run: >-
octo push
--server ${{ secrets.OCTOPUS_URL }}
--apiKey ${{ secrets.OCTOPUS_APIKEY }}
--package /home/runner/work/PowerBIReporting/PowerBIReporting/Application/PowerBIApplication.${{ steps.get_version.outputs.VERSION }}.zip
--overwrite-mode IgnoreIfExists
- name: Get Release
if: ${{ github.event.release.prerelease == false }}
id: getrelease
uses: octokit/[email protected]
with:
route: GET /repos/TransactionProcessing/PowerBIReporting/releases/tags/${{ steps.get_version.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Release Notes
if: ${{ github.event.release.prerelease == false }}
id: buildreleasenotes
uses: gr2m/[email protected]
with:
json: ${{ steps.getrelease.outputs.data }}
releasenote: "body"
- name: Create Release in Octopus
if: ${{ github.event.release.prerelease == false }}
run: >-
octo create-release
--server ${{ secrets.OCTOPUS_URL }}
--apiKey ${{ secrets.OCTOPUS_APIKEY }}
--project "Reporting"
--version ${{ steps.get_version.outputs.VERSION }}
--releasenotes "${{ steps.buildreleasenotes.outputs.releasenote }}"
- name: Deploy Release in Octopus for PBI Tools Tennant
if: ${{ github.event.release.prerelease == false }}
run: >-
octo deploy-release
--server ${{ secrets.OCTOPUS_URL }}
--apiKey ${{ secrets.OCTOPUS_APIKEY }}
--project "Reporting"
--version ${{ steps.get_version.outputs.VERSION }}
--channel Default
--deployTo Staging
--tenant PBITools
--waitfordeployment
--deploymenttimeout 00:05:00
- name: Deploy Release in Octopus for Demo Estate Tennant
if: ${{ github.event.release.prerelease == false }}
run: >-
octo deploy-release
--server ${{ secrets.OCTOPUS_URL }}
--apiKey ${{ secrets.OCTOPUS_APIKEY }}
--project "Reporting"
--version ${{ steps.get_version.outputs.VERSION }}
--channel Default
--deployTo Staging
--tenant "DemoEstate"
--waitfordeployment
--deploymenttimeout 00:05:00