Skip to content

Commit

Permalink
ci: Add job to test artifact downloads
Browse files Browse the repository at this point in the history
Downgrade the artifact upload/download actions to v3 since none of the
v4 versions seem to address the "Not a valid zip file" issue.

Modified the codesign job to additionally run on PRs, so that when
Renovate upgrades the upload/download artifacts, we can tell from the PR
if the ZIP file issue is fixed.

For more info, see:

- actions/download-artifact#328
- docker/build-push-action#1167
  • Loading branch information
rcdailey committed Jul 11, 2024
1 parent 72c55da commit 9329e01
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/download-tar/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/download-artifact@v4.1.7
- uses: actions/download-artifact@v3.0.2
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-tar/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
shell: bash
working-directory: ${{ inputs.path }}

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.3
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}/artifact.tar
Expand Down
31 changes: 27 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ jobs:
codesign:
name: Apple Signing
runs-on: macos-latest
# Ignore pull requests & non-master branches
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
# non-master branches
if: |
github.event_name == 'pull_request' ||
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags/v')
needs: [build-osx]
strategy:
matrix:
Expand Down Expand Up @@ -124,6 +127,26 @@ jobs:
uses: ./.github/workflows/reusable-docker.yml
secrets: inherit

#############################################
test-artifact-download:
name: Test Artifact Download
runs-on: ubuntu-latest
needs:
- build-win
- build-linux
- codesign # Depends on build-osx
- docker # Depends on build-musl
env:
XZ_OPT: "-T0 -9"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download Artifacts
uses: ./.github/actions/download-tar
with:
path: publish

#############################################
release:
name: Release
Expand All @@ -132,8 +155,8 @@ jobs:
needs:
- build-win
- build-linux
- codesign # Depends on build-osx
- docker # Only for preventing a release if docker build & publish fails
- build-musl
- codesign # Depends on build-osx, and reuploads artifacts after signing
env:
XZ_OPT: "-T0 -9"
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/reusable-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:

- name: Build & Push Image
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: .
push: ${{ env.SHOULD_PUBLISH == 'true' }}
Expand Down

0 comments on commit 9329e01

Please sign in to comment.