Skip to content

Commit

Permalink
chore(build): Refactor GitHub artifact handling
Browse files Browse the repository at this point in the history
Closes #303.

chore: Bump actions/upload-artifact from 3.1.3 to 4.0.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v3.1.3...v4.0.0)

chore: Bump actions/download-artifact from 3.0.2 to 4.1.0

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.2 to 4.1.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v3.0.2...v4.1.0)

Use unique artifact names for uploading native executables

Move build artifacts to correct folder
  • Loading branch information
dependabot[bot] authored and mthmulders committed Dec 27, 2023
1 parent 8ac8b89 commit e2275a9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Download all build artifacts
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0

- name: Check out repository
uses: actions/[email protected]
Expand Down Expand Up @@ -96,9 +96,9 @@ jobs:
run: mvn -B -Pdist package -DskipTests

- name: Upload build artifacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
with:
name: artifacts
name: artifacts-${{ matrix.os }}
path: |
target/distributions/*.zip
target/distributions/*.tar.gz
Expand All @@ -120,7 +120,17 @@ jobs:
run: git checkout ${{ steps.head.outputs.content }}

- name: Download all build artifacts
uses: actions/[email protected]
uses: actions/[email protected]
with:
path: /tmp/artifacts

- name: Move build artifacts to correct folder
run: |
targets=("ubuntu-latest" "macOS-latest" "macOS-arm64-latest" "windows-latest")
mkdir -p target/distributions
find /tmp/artifacts/ -name "mcs*" -exec mv -v {} target/distributions/ \;
- name: Cache Maven packages
uses: actions/[email protected]
Expand All @@ -136,7 +146,7 @@ jobs:

- name: Capture JReleaser output
if: always()
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
with:
name: jreleaser-release-output
retention-days: 7
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
echo $NEXT_VERSION > NEXT_VERSION
- name: Upload version files
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
with:
name: artifacts
path: |
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:

steps:
- name: Download all build artifacts
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0

- name: Read HEAD ref
id: head
Expand Down Expand Up @@ -155,9 +155,9 @@ jobs:
run: mvn -B -Pdist package -DskipTests

- name: Upload build artifacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
with:
name: artifacts
name: artifacts-${{ matrix.os }}
path: |
target/distributions/*.zip
target/distributions/*.tar.gz
Expand All @@ -171,7 +171,7 @@ jobs:
steps:
# must read HEAD before checkout
- name: Download all build artifacts
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0

- name: Read HEAD ref
id: head
Expand Down Expand Up @@ -202,7 +202,17 @@ jobs:

# checkout will clobber downloaded artifacts; we have to download them again
- name: Download all build artifacts
uses: actions/[email protected]
uses: actions/[email protected]
with:
path: /tmp/artifacts

- name: Move build artifacts to correct folder
run: |
targets=("ubuntu-latest" "macOS-latest" "macOS-arm64-latest" "windows-latest")
mkdir -p target/distributions
find /tmp/artifacts/ -name "mcs*" -exec mv -v {} target/distributions/ \;
- name: Set up Java
uses: actions/[email protected]
Expand Down Expand Up @@ -236,7 +246,7 @@ jobs:

- name: Capture JReleaser output
if: always()
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
with:
name: jreleaser-release-output
retention-days: 7
Expand Down

0 comments on commit e2275a9

Please sign in to comment.