Skip to content

Commit fdbefbd

Browse files
committed
fix: ci
1 parent 07bdb3a commit fdbefbd

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
build:
13-
name: Build and Release
13+
name: Build ${{ matrix.asset-name }}
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
@@ -57,20 +57,32 @@ jobs:
5757
mv andromeda ${{ matrix.asset-name }}
5858
fi
5959
60-
- name: Upload Binary to Release
61-
if: github.ref == 'refs/heads/main'
60+
- name: Upload Binary as Artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: ${{ matrix.asset-name }}
64+
path: target/${{ matrix.rust-target }}/release/${{ matrix.asset-name }}
65+
66+
release:
67+
name: Create Release
68+
needs: build
69+
runs-on: ubuntu-latest
70+
if: github.ref == 'refs/heads/main'
71+
72+
steps:
73+
- uses: actions/checkout@v3
74+
75+
- name: Download all artifacts
76+
uses: actions/download-artifact@v4
77+
with:
78+
path: ./artifacts
79+
80+
- name: Create Draft Release
6281
uses: svenstaro/upload-release-action@v2
6382
with:
6483
repo_token: ${{ secrets.GITHUB_TOKEN }}
65-
file: target/${{ matrix.rust-target }}/release/${{ matrix.asset-name }}
66-
asset_name: ${{ matrix.asset-name }}
84+
file: ./artifacts/*/andromeda-*
85+
file_glob: true
6786
draft: true
6887
tag: latest
6988
overwrite: true
70-
71-
- name: Upload Binary as Artifact (Main Branch)
72-
if: github.ref == 'refs/heads/main'
73-
uses: actions/upload-artifact@v4
74-
with:
75-
name: ${{ matrix.asset-name }}
76-
path: target/${{ matrix.rust-target }}/release/${{ matrix.asset-name }}

0 commit comments

Comments
 (0)