From 535582506b90ef93e9901dea344ce2a092857424 Mon Sep 17 00:00:00 2001 From: Matthew Casperson Date: Wed, 5 May 2021 14:15:21 +1000 Subject: [PATCH] Created an octopus package and uploaded the artifact --- .github/workflows/cloudservice.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cloudservice.yml b/.github/workflows/cloudservice.yml index ec15928..0c3c229 100644 --- a/.github/workflows/cloudservice.yml +++ b/.github/workflows/cloudservice.yml @@ -23,4 +23,29 @@ jobs: run: mkdir cspack; Expand-Archive -LiteralPath cspack.zip -DestinationPath cspack - name: CSPack shell: powershell - run: .\cspack\cspack.exe ServiceDefinition.csdef "/role:WebRole1;RandomQuotes\obj\Production\Package\PackageTmp" "/rolePropertiesFile:WebRole1;.\AzureRoleProperties.txt" "/sitePhysicalDirectories:WebRole1;Web;RandomQuotes\obj\Production\Package\PackageTmp" "/out:RandomQuotes-Azure-Release.cspkg" \ No newline at end of file + run: .\cspack\cspack.exe ServiceDefinition.csdef "/role:WebRole1;RandomQuotes\obj\Production\Package\PackageTmp" "/rolePropertiesFile:WebRole1;.\AzureRoleProperties.txt" "/sitePhysicalDirectories:WebRole1;Web;RandomQuotes\obj\Production\Package\PackageTmp" "/out:RandomQuotes-Azure-Release.cspkg" + - name: Create Octopus Package + shell: powershell + run: Get-ChildItem -Path RandomQuotes-Azure-Release.cspkg, ServiceConfiguration.Cloud.cscfg | Compress-Archive -DestinationPath RandomQuotes-Azure-Release.1.0.${{ github.run_number }}.zip + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: 0.0.${{ github.run_number }} + release_name: Release 0.0.${{ github.run_number }} + draft: false + prerelease: false + + - name: Upload Zip Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: . + asset_name: RandomQuotes-Azure-Release.1.0.${{ github.run_number }}.zip + asset_content_type: application/zip \ No newline at end of file