From 1feb1279ee227cd08e6ab6e39cc58730b4158c84 Mon Sep 17 00:00:00 2001 From: Marc R Kellerman <9411143+mkellerman@users.noreply.github.com> Date: Tue, 19 Dec 2023 11:28:34 -0800 Subject: [PATCH] Add package and deploy workflow --- .github/workflows/package_deploy.yml | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/package_deploy.yml diff --git a/.github/workflows/package_deploy.yml b/.github/workflows/package_deploy.yml new file mode 100644 index 00000000..19aa3cab --- /dev/null +++ b/.github/workflows/package_deploy.yml @@ -0,0 +1,51 @@ +name: Package and Deploy + +on: + push: + branches: + - feature/package-artifact + workflow_dispatch: + + +jobs: + build_module: + name: Build Module + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup PowerShell module cache + id: cacher + uses: actions/cache@v3 + with: + path: "~/.local/share/powershell/Modules" + key: ${{ runner.os }}-PSModules + - name: Setup + shell: pwsh + run: | + ./Tools/setup.ps1 + Invoke-Build -Task ShowInfo + - name: Build + shell: pwsh + run: | + Invoke-Build -Task Clean, Build + - name: Package + shell: pwsh + run: | + Invoke-Build -Task Package + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: JiraPS.zip + path: ./Release/JiraPS.zip + - name: Package + shell: pwsh + run: | + Invoke-Build -Task Package + - name: Deploy + if: ${{ github.ref == 'refs/heads/master' }} + shell: pwsh + run: | + # Invoke-Build -Task Deploy + Write-Warning "SKIPPING: Invoke-Build -Task Deploy" + if: ${{ success() }} +