-
Notifications
You must be signed in to change notification settings - Fork 15
128 lines (115 loc) · 4.37 KB
/
build_powerbi.yml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: build_powerbi
on:
push:
branches: ["dogukan/rename-data-column"]
jobs:
build-connector:
runs-on: windows-latest
outputs:
semver: ${{ steps.set-version.outputs.semver }}
file-version: ${{ steps.set-info-version.outputs.file-version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: 6.0.5 # github actions doesnt like 6.1.0 onwards https://github.com/GitTools/actions/blob/main/docs/versions.md
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Set connector internal version
working-directory: src/powerbi-data-connector
run: |
$version = ${{steps.gitversion.outputs.AssemblySemVer}}
(Get-Content ./Speckle.pq).replace('[Version = "3.0.0"]', '[Version = "'+$version+'"]') | Set-Content ./Speckle.pq
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Build Data Connector
working-directory: src/powerbi-data-connector
run: |
msbuild Speckle.proj /restore /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true
- name: Create PQX file
run: |
./tools/MakePQX/MakePQX.exe pack -mz src/powerbi-data-connector/bin/Speckle.mez -t src/powerbi-data-connector/bin/Speckle.pqx
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: powerbi-connector
path: src/powerbi-data-connector/bin/Speckle.pqx
retention-days: 5
- id: set-version
name: Set version to output
run: echo "semver=${{steps.gitversion.outputs.semVer}}" >> "$GITHUB_OUTPUT"
shell: bash
- id: set-info-version
name: Set version to output
run: echo "file-version=${{steps.gitversion.outputs.AssemblySemVer}}" >> "$GITHUB_OUTPUT"
shell: bash
build-visual:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: 6.0.5 # github actions doesnt like 6.1.0 onwards https://github.com/GitTools/actions/blob/main/docs/versions.md
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- run: npm ci
working-directory: src/powerbi-visual
- run: npm version ${{steps.gitversion.outputs.semVer}} --allow-same-version
working-directory: src/powerbi-visual
- run: npm run build
working-directory: src/powerbi-visual
- uses: actions/upload-artifact@v4
with:
name: powerbi-visual
path: src/powerbi-visual/dist/*.pbiviz
deploy-installers:
runs-on: ubuntu-latest
needs:
- build-connector
- build-visual
env:
IS_TAG_BUILD: ${{ github.ref_type == 'tag' }}
steps:
- name: download artifacts
uses: actions/download-artifact@v4
with:
name: powerbi-connector
path: artifacts/
- name: download artifacts visual
uses: actions/download-artifact@v4
with:
name: powerbi-visual
path: artifacts/
- name: Zip artifacts
run: |
cd artifacts && zip -r ../powerbi.zip .
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{needs.build-connector.outputs.semver}}
path: powerbi.zip
- name: 🔫 Trigger Build Installers
uses: ALEEF02/[email protected]
with:
workflow: Build PowerBI
repo: specklesystems/connector-installers
token: ${{ secrets.CONNECTORS_GH_TOKEN }}
inputs: '{ "run_id": "${{ github.run_id }}", "semver": "${{ needs.build-connector.outputs.semver }}", "file_version": "${{ needs.build-connector.outputs.file-version }}", "public_release": ${{ env.IS_TAG_BUILD }} }'
ref: main
wait-for-completion: true
wait-for-completion-interval: 10s
wait-for-completion-timeout: 10m
display-workflow-run-url: true
display-workflow-run-url-interval: 10s