|
19 | 19 | - target: aarch64-apple-darwin
|
20 | 20 | # xlarge are on arm
|
21 | 21 | os: "'macos-latest-xlarge'"
|
| 22 | + - target: x86_64-pc-windows-msvc |
| 23 | + os: "'windows-latest'" |
22 | 24 | #- target: aarch64-unknown-linux-gnu
|
23 | 25 | # os: ubuntu-latest
|
24 | 26 | name: Build Convex Backend
|
@@ -65,28 +67,39 @@ jobs:
|
65 | 67 | just rush install
|
66 | 68 | just rush build
|
67 | 69 |
|
| 70 | + - name: Precompute release name |
| 71 | + id: release_name |
| 72 | + shell: bash |
| 73 | + run: | |
| 74 | + echo "RELEASE_NAME=$(date +'%Y-%m-%d')-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT |
| 75 | + ZIP_NAME=convex-local-backend-${{ matrix.target }}.zip |
| 76 | + BINARY_NAME=convex-local-backend${{ runner.os == 'Windows' && '.exe' || '' }} |
| 77 | + echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_OUTPUT |
| 78 | + echo "BINARY_NAME=$BINARY_NAME" >> $GITHUB_OUTPUT |
| 79 | +
|
68 | 80 | - name: Build backend
|
| 81 | + shell: bash |
69 | 82 | run: |
|
| 83 | + set -ex |
70 | 84 | unset ROCKSDB_LIB_DIR
|
71 | 85 | unset SODIUM_USE_PKG_CONFIG
|
72 | 86 | unset SNAPPY_LIB_DIR
|
73 | 87 | cargo build --release -p local_backend --bin convex-local-backend
|
| 88 | + mv target/release/${{ steps.release_name.outputs.BINARY_NAME }} . |
74 | 89 |
|
75 | 90 | - name: Zip backend into arch
|
76 |
| - run: | |
77 |
| - mv target/release/convex-local-backend . |
78 |
| - zip -r convex-local-backend-${{ matrix.target }} convex-local-backend |
79 |
| -
|
80 |
| - - name: Precompute release name |
81 |
| - id: release_name |
82 |
| - run: echo "RELEASE_NAME=$(date +'%Y-%m-%d')-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT |
| 91 | + uses: thedoctor0/[email protected] |
| 92 | + with: |
| 93 | + type: zip |
| 94 | + filename: ${{ steps.release_name.outputs.ZIP_NAME }} |
| 95 | + path: ${{ steps.release_name.outputs.BINARY_NAME }} |
83 | 96 |
|
84 | 97 | - name: Create Upload Precompiled Artifacts
|
85 | 98 | id: create_release
|
86 | 99 | uses: softprops/action-gh-release@v2
|
87 | 100 | with:
|
88 | 101 | files: |
|
89 |
| - convex-local-backend-${{ matrix.target }}.zip |
| 102 | + ${{ steps.release_name.outputs.ZIP_NAME }} |
90 | 103 | LICENSE.md
|
91 | 104 | tag_name: precompiled-${{ steps.release_name.outputs.RELEASE_NAME }}
|
92 | 105 | name: Precompiled ${{ steps.release_name.outputs.RELEASE_NAME }}
|
|
0 commit comments