136 lines
4.7 KiB
YAML
136 lines
4.7 KiB
YAML
name: build_powerbi
|
|
on:
|
|
push:
|
|
branches: ["dev"]
|
|
tags: ["v3.*"] # Manual delivery on every 3.x tag
|
|
jobs:
|
|
build-connector:
|
|
runs-on: windows-latest
|
|
outputs:
|
|
semver: ${{ steps.set-version.outputs.semver }}
|
|
file-version: ${{ steps.set-info-version.outputs.file-version }}
|
|
env:
|
|
CertFile: "./speckle.pfx"
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install GitVersion
|
|
uses: gittools/actions/gitversion/setup@v3.0.0
|
|
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/execute@v3.0.0
|
|
|
|
- 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: Setup Self-sign certificate
|
|
run: |
|
|
echo "${{ secrets.SELF_CERT_FILE_B64 }}" > "certificate.txt"
|
|
certutil -decode certificate.txt ${{ env.CertFile }}
|
|
|
|
- name: Create PQX file
|
|
run: |
|
|
.\tools\MakePQX\MakePQX.exe pack --mez src/powerbi-data-connector/bin/Speckle.mez --target src/powerbi-data-connector/bin/Speckle.pqx --certificate ${{env.CertFile}} --password ${{secrets.SELF_CERT_PASSWORD}}
|
|
|
|
- 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/setup@v3.0.0
|
|
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/execute@v3.0.0
|
|
|
|
- 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: pull powerbi-service
|
|
run: |
|
|
curl --location --output powerbi-service.zip https://releases.speckle.dev/services/powerbi-service/powerbi-service-0.7.0.zip # bump this version as needed
|
|
unzip powerbi-service.zip -d 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/workflow-dispatch@v3.0.0
|
|
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
|