Skip to content

Commit

Permalink
Revert "ci: update actions/upload-artifact to v4 with merge" (#2173)
Browse files Browse the repository at this point in the history
Reverts #2158
  • Loading branch information
szokeasaurusrex authored Oct 1, 2024
1 parent 928a2b5 commit e0a589b
Showing 1 changed file with 26 additions and 52 deletions.
78 changes: 26 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ jobs:
- name: Rename Binary
run: mv target/*/release/sentry-cli sentry-cli-Linux-${{ matrix.arch }}

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.1
with:
name: artifact-bin-linux-${{ matrix.arch }}
name: ${{ github.sha }}
path: sentry-cli-Linux-${{ matrix.arch }}
if-no-files-found: 'error'

macos:
strategy:
Expand Down Expand Up @@ -77,31 +76,28 @@ jobs:
- name: Rename Binary
run: mv target/${{ matrix.target }}/release/sentry-cli sentry-cli-Darwin-${{ matrix.arch }}

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.1
with:
name: artifact-bin-macos-${{ matrix.arch }}
name: ${{ github.sha }}
path: sentry-cli-Darwin-${{ matrix.arch }}
if-no-files-found: 'error'

macos_universal:
needs: macos
name: macOS universal
runs-on: macos-latest

steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
pattern: artifact-bin-macos-*
merge-multiple: true
name: ${{ github.sha }}

- name: Link universal binary
run: lipo -create -output sentry-cli-Darwin-universal sentry-cli-Darwin-x86_64 sentry-cli-Darwin-arm64

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.1
with:
name: artifact-bin-macos-universal
name: ${{ github.sha }}
path: sentry-cli-Darwin-universal
if-no-files-found: 'error'

windows:
strategy:
Expand Down Expand Up @@ -136,11 +132,10 @@ jobs:
- name: Rename Binary
run: mv target/release/sentry-cli.exe sentry-cli-Windows-${{ matrix.arch }}.exe

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.1
with:
name: artifact-bin-windows-${{ matrix.arch }}
name: ${{ github.sha }}
path: sentry-cli-Windows-${{ matrix.arch }}.exe
if-no-files-found: 'error'

node:
name: NPM Package
Expand All @@ -155,10 +150,9 @@ jobs:
node-version: '20.10.0'

- name: Download compiled binaries
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
pattern: artifact-bin-*
merge-multiple: true
name: ${{ github.sha }}

- name: Calculate and store checksums
shell: bash
Expand All @@ -168,11 +162,10 @@ jobs:
- run: npm pack

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.1
with:
name: artifact-pkg-node
name: ${{ github.sha }}
path: '*.tgz'
if-no-files-found: 'error'

python-base:
name: python (base)
Expand All @@ -189,11 +182,10 @@ jobs:
with:
python-version: '3.11'
- run: python3 -m pip install build && python3 -m build
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.1
with:
name: artifact-python-base
name: ${{ github.sha }}-python-base
path: dist/*
if-no-files-found: 'error'

python:
name: python
Expand All @@ -204,22 +196,19 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
pattern: artifact-bin-*
merge-multiple: true
name: ${{ github.sha }}
path: binaries
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
name: artifact-python-base
merge-multiple: true
name: ${{ github.sha }}-python-base
path: python-base
- run: scripts/wheels --binaries binaries --base python-base --dest dist
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3.1.1
with:
name: artifact-pkg-python
name: ${{ github.sha }}
path: dist/*
if-no-files-found: 'error'

npm-distributions:
name: 'Build NPM distributions'
Expand All @@ -230,10 +219,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.10.0'
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
pattern: artifact-bin-*
merge-multiple: true
name: ${{ github.sha }}
path: binary-artifacts
- name: Move binaries into distribution packages
run: |
Expand All @@ -255,22 +243,8 @@ jobs:
npm pack
cd -
done
- name: Upload packaged npm binary distributions
uses: actions/upload-artifact@v4
with:
name: artifact-npm-binary-distributions
path: npm-binary-distributions/*/*.tgz
if-no-files-found: 'error'

merge:
name: Create Release Artifact
runs-on: ubuntu-latest
needs: [linux, macos, macos_universal, windows, npm-distributions, node, python]
steps:
- uses: actions/upload-artifact/merge@v4
uses: actions/upload-artifact@v3.1.1
with:
# Craft expects release assets to be a single artifact named after the sha.
name: ${{ github.sha }}
pattern: artifact-*
delete-merged: true
path: npm-binary-distributions/*/*.tgz

0 comments on commit e0a589b

Please sign in to comment.