|
| 1 | +name: Release |
| 2 | + |
1 | 3 | on: |
2 | 4 | push: |
3 | 5 | # Sequence of patterns matched against refs/tags |
|
20 | 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
21 | 23 | with: |
22 | 24 | tag_name: ${{ steps.get_version.outputs.VERSION }} |
23 | | - release_name: Release ${{ steps.get_version.outputs.VERSION }} |
| 25 | + release_name: ckb-debugger ${{ steps.get_version.outputs.VERSION }} |
24 | 26 | draft: false |
25 | 27 | prerelease: false |
26 | 28 | - name: Output upload URL file |
|
75 | 77 | asset_path: ckb-debugger-linux-x64-sha256.txt |
76 | 78 | asset_name: ckb-debugger-linux-x64-sha256.txt |
77 | 79 | asset_content_type: text/plain |
| 80 | + |
| 81 | + publish-macos: |
| 82 | + name: Publish binary on macOS |
| 83 | + needs: [release] |
| 84 | + runs-on: macos-latest |
| 85 | + steps: |
| 86 | + - name: Load upload URL file |
| 87 | + uses: actions/download-artifact@v1 |
| 88 | + with: |
| 89 | + name: upload_url |
| 90 | + - name: Get upload URL |
| 91 | + id: get_upload_url |
| 92 | + run: | |
| 93 | + value=`cat upload_url/upload_url.txt` |
| 94 | + echo ::set-output name=upload_url::$value |
| 95 | + env: |
| 96 | + TAG_REF_NAME: ${{ github.ref }} |
| 97 | + REPOSITORY_NAME: ${{ github.repository }} |
| 98 | + - uses: actions/checkout@v2 |
| 99 | + - name: Build |
| 100 | + run: cd bins && cargo build --release |
| 101 | + - name: Archive files |
| 102 | + run: tar -cvzf ckb-debugger-macos-x64.tar.gz bins/target/release/ckb-debugger LICENSE |
| 103 | + - name: Generate checksum |
| 104 | + run: sha256sum ckb-debugger-macos-x64.tar.gz > ckb-debugger-macos-x64-sha256.txt |
| 105 | + - name: Upload binary |
| 106 | + id: upload-release-binary |
| 107 | + uses: actions/upload-release-asset@v1 |
| 108 | + env: |
| 109 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 110 | + with: |
| 111 | + upload_url: ${{ steps.get_upload_url.outputs.upload_url }} |
| 112 | + asset_path: ckb-debugger-macos-x64.tar.gz |
| 113 | + asset_name: ckb-debugger-macos-x64.tar.gz |
| 114 | + asset_content_type: application/tar+gzip |
| 115 | + - name: Upload checksum |
| 116 | + id: upload-release-checksum |
| 117 | + uses: actions/upload-release-asset@v1 |
| 118 | + env: |
| 119 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 120 | + with: |
| 121 | + upload_url: ${{ steps.get_upload_url.outputs.upload_url }} |
| 122 | + asset_path: ckb-debugger-macos-x64-sha256.txt |
| 123 | + asset_name: ckb-debugger-macos-x64-sha256.txt |
| 124 | + asset_content_type: text/plain |
0 commit comments