|
1 | | -name: Build Artifacts |
| 1 | +name: Build and Release Artifacts |
2 | 2 | on: |
3 | | - pull_request: |
4 | 3 | push: |
5 | | - branches: |
6 | | - - '**' |
7 | 4 | tags: |
8 | 5 | - 'v*' |
9 | 6 | concurrency: |
10 | | - group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }} |
| 7 | + group: ${{ github.run_id }} |
11 | 8 | cancel-in-progress: true |
12 | 9 | env: |
13 | 10 | MAKEJOBS: '-j10' |
|
38 | 35 | mkdir -p bitcoin-${{ steps.version.outputs.VERSION }}-x86_64-linux-gnu/bin |
39 | 36 | cp src/bitcoind src/bitcoin-cli src/bitcoin-tx src/bitcoin-util src/bitcoin-wallet bitcoin-${{ steps.version.outputs.VERSION }}-x86_64-linux-gnu/bin/ |
40 | 37 | tar -czf bitcoin-${{ steps.version.outputs.VERSION }}-x86_64-linux-gnu.tar.gz bitcoin-${{ steps.version.outputs.VERSION }}-x86_64-linux-gnu |
41 | | - - name: Upload artifact |
| 38 | + - name: Upload temporary artifact |
42 | 39 | uses: actions/upload-artifact@v4 |
43 | 40 | with: |
44 | 41 | name: linux-artifact |
|
66 | 63 | mkdir -p bitcoin-${{ steps.version.outputs.VERSION }}-arm64-apple-darwin/bin |
67 | 64 | cp src/bitcoind src/bitcoin-cli src/bitcoin-tx src/bitcoin-util src/bitcoin-wallet bitcoin-${{ steps.version.outputs.VERSION }}-arm64-apple-darwin/bin/ |
68 | 65 | tar -czf bitcoin-${{ steps.version.outputs.VERSION }}-arm64-apple-darwin.tar.gz bitcoin-${{ steps.version.outputs.VERSION }}-arm64-apple-darwin |
69 | | - - name: Upload artifact |
| 66 | + - name: Upload temporary artifact |
70 | 67 | uses: actions/upload-artifact@v4 |
71 | 68 | with: |
72 | 69 | name: macos-artifact |
73 | 70 | path: bitcoin-${{ steps.version.outputs.VERSION }}-arm64-apple-darwin.tar.gz |
74 | 71 |
|
| 72 | + release: |
| 73 | + name: Create Release and Upload Assets |
| 74 | + runs-on: ubuntu-latest |
| 75 | + needs: [build-linux, build-macos] |
| 76 | + steps: |
| 77 | + - name: Checkout |
| 78 | + uses: actions/checkout@v5 |
| 79 | + - name: Download Linux artifact |
| 80 | + uses: actions/download-artifact@v4 |
| 81 | + with: |
| 82 | + name: linux-artifact |
| 83 | + - name: Download macOS artifact |
| 84 | + uses: actions/download-artifact@v4 |
| 85 | + with: |
| 86 | + name: macos-artifact |
| 87 | + - name: Release |
| 88 | + uses: softprops/action-gh-release@v2 |
| 89 | + with: |
| 90 | + files: | |
| 91 | + bitcoin-*.tar.gz |
| 92 | + name: Release ${{ github.ref_name }} |
| 93 | + generate_release_notes: true |
| 94 | + |
0 commit comments