Skip to content

Commit

Permalink
ExcelDeploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gavbrennan committed Apr 21, 2023
1 parent 19c6f1d commit adf5150
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/ExcelDeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Qwack Excel Deploy

on:
workflow_dispatch:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

jobs:
job_1:
name: Build, Zip and Store
runs-on: windows-latest
steps:
- uses: actions/checkout@main
name: Checkout Code
with:
submodules: 'true'

- name: Setup MSBuild Path
uses: warrenbuckley/Setup-MSBuild@v1

- name: Setup NuGet
uses: NuGet/[email protected]

- name: Restore NuGet Packages
run: nuget restore Qwack.sln
working-directory: './'

- name: Restore DotNet
run: dotnet restore
working-directory: './'

- name: Build and Publish Excel Add-in
working-directory: './'
run: |
$version = Get-Content ../../version.txt
dotnet build Qwackl.sln /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile
- name: Zip deployment
uses: vimtor/action-zip@v1
with:
files: ./clients/Qwack.Excel.Next/bin/Release/net6.0-windows
dest: QwackExcel.zip

- name: Create Artifact
uses: actions/upload-artifact@v2
with:
name: excelArtifact
path: ./QwackExcel.zip

name: Retrieve and Upload to Azure
runs-on: ubuntu-latest
needs: job_1
steps:

- name: Fetch Artifact
uses: actions/download-artifact@v2
with:
name: excelArtifact

- name: Fetch Artifact
uses: actions/download-artifact@v2
with:
name: msiArtifact

- name: Login To Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Upload to blob storage
uses: azure/CLI@v1
with:
azcliversion: 2.30.0
inlineScript: |
az storage blob upload-batch --account-name pltfm -d exceladdin -s . --pattern GalenaExcel.zip
- name: Upload MSI to blob storage
uses: azure/CLI@v1
with:
azcliversion: 2.30.0
inlineScript: |
az storage blob upload-batch --account-name pltfm -d exceladdin -s . --pattern ExcelAddInDeploy.zip
- name: logout
run: |
az logout
- name: Delete Artifact
uses: GeekyEggo/[email protected]
with:
name: |
excelArtifact
msiArtifact

0 comments on commit adf5150

Please sign in to comment.