Skip to content

Commit

Permalink
GHA: Switch to new artifacts API (#4555)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke authored Jan 8, 2024
1 parent f192187 commit 89267b1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .github/actions/7-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ runs:
run: mv ../artifacts ./

- name: Upload artifact(s)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: artifacts/
compression-level: 0
15 changes: 6 additions & 9 deletions .github/actions/merge-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ runs:
using: composite
steps:

- name: Download x86_64 artifact
uses: actions/download-artifact@v3
- name: Download x86_64 and arm64 artifacts
uses: actions/download-artifact@v4
with:
name: osx-x86_64
path: artifacts/
- name: Download arm64 artifact
uses: actions/download-artifact@v3
with:
name: osx-arm64
pattern: osx-*
path: artifacts/
merge-multiple: true # place all files into artifacts/ directly

- name: Extract & merge artifacts
shell: bash
Expand Down Expand Up @@ -138,7 +134,8 @@ runs:
tar -cf - $artifactName | 7za a newArtifacts/$artifactName.tar.xz -si -txz -mx9
- name: Upload universal package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: osx-universal
path: newArtifacts/
compression-level: 0
15 changes: 6 additions & 9 deletions .github/actions/merge-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ runs:
using: composite
steps:

- name: Download x64 artifact
uses: actions/download-artifact@v3
- name: Download x64 and x86 artifacts
uses: actions/download-artifact@v4
with:
name: windows-x64
path: artifacts/
- name: Download x86 artifact
uses: actions/download-artifact@v3
with:
name: windows-x86
pattern: windows-*
path: artifacts/
merge-multiple: true # place all files into artifacts/ directly

- name: Extract & merge artifacts
shell: bash
Expand Down Expand Up @@ -100,7 +96,8 @@ runs:
packaging\windows_installer.iss
- name: Upload multilib package & installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: windows-multilib
path: newArtifacts/
compression-level: 0
9 changes: 4 additions & 5 deletions .github/actions/upload-to-github/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ runs:
steps:

- name: Download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts/
merge-multiple: true # place all files into artifacts/ directly

- name: Set GITHUB_RELEASE_TAG & ARTIFACT_ID
shell: bash
Expand Down Expand Up @@ -35,15 +36,12 @@ runs:
file: ^ldc2-${{ env.ARTIFACT_ID }}-
target: existing-artifacts/

- name: Move artifact files out of their subdirs & compute hashes
- name: Merge existing artifacts & compute hashes
shell: bash
run: |
set -eux
cd artifacts
mv */*.* ./
find . -type d -empty -delete
ls -lh
# Extend by existing release artifacts *missing* from GitHub workflow,
# e.g., artifacts published by Cirrus CI etc.
Expand All @@ -52,6 +50,7 @@ runs:
mv -n ../existing-artifacts/*.* ./
fi
ls -lh
sha256sum * > "ldc2-$ARTIFACT_ID.sha256sums.txt"
- name: Upload to GitHub release
Expand Down

0 comments on commit 89267b1

Please sign in to comment.