From 8102b5933f0c0201e80fc749ee86818c57035a7d Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Thu, 19 Dec 2024 16:19:43 -0700 Subject: [PATCH] ci: Mock the artifact creation for the test workflow [skip ci] --- .github/workflows/test-chocolatey-deploy.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-chocolatey-deploy.yml b/.github/workflows/test-chocolatey-deploy.yml index 8128618..969eefa 100644 --- a/.github/workflows/test-chocolatey-deploy.yml +++ b/.github/workflows/test-chocolatey-deploy.yml @@ -17,15 +17,14 @@ jobs: with: fetch-depth: 1 - - name: Get release artifacts - uses: actions/download-artifact@v4.1.7 - with: - name: artifacts - path: artifacts - - name: Set release assets and version shell: pwsh run: | + # mock artifact data + mkdir artifacts + 'c27e191f4290501287ca16268d9c2029e1f5cd01f7c2ac2be3cdfee80395f719' | Set-Content -Path artifacts/managarr-windows.sha256 + '0.4.0' | Set-Content -Path artifacts/release-version + # Read the first column from the SHA256 file $windows_sha = Get-Content ./artifacts/managarr-windows.sha256 | ForEach-Object { $_.Split(' ')[0] } Add-Content -Path $env:GITHUB_ENV -Value "WINDOWS_SHA=$windows_sha" @@ -34,17 +33,12 @@ jobs: $release_version = Get-Content ./artifacts/release-version Add-Content -Path $env:GITHUB_ENV -Value "RELEASE_VERSION=$release_version" - - name: Validate release environment variables - run: | - echo "Release SHA windows: ${{ env.WINDOWS_SHA }}" - echo "Release version: ${{ env.RELEASE_VERSION }}" - - name: Package and Publish package to Chocolatey run: | mkdir ./deployment/chocolatey/tools # Run packaging script - python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/managarr.nuspec.template" "./deployment/chocolatey/managarr.nuspec" ${{ env.WINDOWS_SHA }} - python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/chocolateyinstall.ps1.template" "./deployment/chocolatey/tools/chocolateyinstall.ps1" ${{ env.WINDOWS_SHA }} + python "./deployment/chocolatey/packager.py" "0.4.0" "./deployment/chocolatey/managarr.nuspec.template" "./deployment/chocolatey/managarr.nuspec" ${{ env.WINDOWS_SHA }} + python "./deployment/chocolatey/packager.py" "0.4.0" "./deployment/chocolatey/chocolateyinstall.ps1.template" "./deployment/chocolatey/tools/chocolateyinstall.ps1" ${{ env.WINDOWS_SHA }} # Publish to Chocolatey cd ./deployment/chocolatey