Skip to content

Commit 82826d5

Browse files
chore: add release job
1 parent 546099a commit 82826d5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/rust.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,33 @@ jobs:
4343
name: library-${{ matrix.os }}
4444
path: rs_dfu-*.tar.gz
4545

46+
release:
47+
needs: build
48+
runs-on: ubuntu-latest
49+
if: github.ref_type == 'tag'
50+
steps:
51+
- name: Download all artifacts
52+
uses: actions/download-artifact@v4
53+
with:
54+
path: artifacts
55+
56+
- name: Prepare release assets
57+
run: |
58+
mkdir release-assets
59+
60+
# CLI tools with simplified names
61+
cp artifacts/rdfu-macos-latest/rdfu release-assets/rdfu-macos
62+
cp artifacts/rdfu-ubuntu-22.04/rdfu release-assets/rdfu-linux
63+
cp artifacts/rdfu-windows-latest/rdfu.exe release-assets/rdfu-windows.exe
64+
65+
# Libraries with original names (preserving the full Rust target triple)
66+
find artifacts/library-macos-latest -name "*.tar.gz" -exec cp {} release-assets/ \;
67+
find artifacts/library-ubuntu-22.04 -name "*.tar.gz" -exec cp {} release-assets/ \;
68+
find artifacts/library-windows-latest -name "*.tar.gz" -exec cp {} release-assets/ \;
69+
70+
- name: Release
71+
uses: softprops/action-gh-release@v2
72+
with:
73+
draft: true
74+
generate_release_notes: true
75+
files: release-assets/*

0 commit comments

Comments
 (0)