|
37 | 37 | - name: Install Rust |
38 | 38 | uses: dtolnay/rust-toolchain@stable |
39 | 39 |
|
40 | | - - name: Read version from Cargo.toml |
41 | | - id: version |
42 | | - shell: bash |
43 | | - run: | |
44 | | - version=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n 1) |
45 | | - if [ -z "$version" ]; then |
46 | | - echo "Could not read version from Cargo.toml" >&2 |
47 | | - exit 1 |
48 | | - fi |
49 | | - echo "version=$version" >> "$GITHUB_OUTPUT" |
50 | | - echo "tag=v$version" >> "$GITHUB_OUTPUT" |
51 | | -
|
52 | 40 | - name: Build release binary |
53 | 41 | run: cargo build --release |
54 | 42 |
|
@@ -79,10 +67,35 @@ jobs: |
79 | 67 | name: ${{ matrix.name }} |
80 | 68 | path: dist/${{ matrix.asset_name }} |
81 | 69 |
|
82 | | - - name: Upload release asset to draft release |
| 70 | + release: |
| 71 | + name: Create draft release |
| 72 | + runs-on: ubuntu-latest |
| 73 | + needs: build |
| 74 | + steps: |
| 75 | + - name: Checkout |
| 76 | + uses: actions/checkout@v4 |
| 77 | + |
| 78 | + - name: Read version from Cargo.toml |
| 79 | + id: version |
| 80 | + shell: bash |
| 81 | + run: | |
| 82 | + version=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n 1) |
| 83 | + if [ -z "$version" ]; then |
| 84 | + echo "Could not read version from Cargo.toml" >&2 |
| 85 | + exit 1 |
| 86 | + fi |
| 87 | + echo "tag=v$version" >> "$GITHUB_OUTPUT" |
| 88 | +
|
| 89 | + - name: Download all build artifacts |
| 90 | + uses: actions/download-artifact@v4 |
| 91 | + with: |
| 92 | + path: dist |
| 93 | + merge-multiple: true |
| 94 | + |
| 95 | + - name: Upload assets to draft release |
83 | 96 | uses: softprops/action-gh-release@v2 |
84 | 97 | with: |
85 | 98 | tag_name: ${{ steps.version.outputs.tag }} |
86 | 99 | target_commitish: ${{ github.sha }} |
87 | 100 | draft: true |
88 | | - files: dist/${{ matrix.asset_name }} |
| 101 | + files: dist/* |
0 commit comments