|
19 | 19 |
|
20 | 20 | test: |
21 | 21 | name: Test Suite |
22 | | - runs-on: ubuntu-latest |
| 22 | + strategy: |
| 23 | + matrix: |
| 24 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 25 | + runs-on: ${{ matrix.os }} |
23 | 26 | steps: |
24 | 27 | - uses: actions/checkout@v2 |
| 28 | + - uses: actions/cache@v1 |
| 29 | + with: |
| 30 | + path: ~/.cargo |
| 31 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} |
| 32 | + restore-keys: | |
| 33 | + ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} |
| 34 | + ${{ runner.os }}-cargo |
25 | 35 | - uses: actions-rs/toolchain@v1 |
26 | 36 | with: |
27 | 37 | profile: minimal |
|
67 | 77 | release-linux: |
68 | 78 | if: startsWith(github.ref, 'refs/tags/') |
69 | 79 | needs: [check, test, fmt, clippy] |
70 | | - name: Release Build |
| 80 | + name: Release Linux |
71 | 81 | runs-on: ubuntu-latest |
72 | 82 | steps: |
73 | 83 | - uses: actions/checkout@v2 |
|
89 | 99 | with: |
90 | 100 | files: | |
91 | 101 | target/release/scry_amd64 |
| 102 | + draft: true |
| 103 | + env: |
| 104 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 105 | + |
| 106 | + release-macos: |
| 107 | + if: startsWith(github.ref, 'refs/tags/') |
| 108 | + needs: [check, test, fmt, clippy] |
| 109 | + name: Release MacOS |
| 110 | + runs-on: macos-latest |
| 111 | + steps: |
| 112 | + - uses: actions/checkout@v2 |
| 113 | + - uses: actions-rs/toolchain@v1 |
| 114 | + with: |
| 115 | + profile: minimal |
| 116 | + toolchain: stable |
| 117 | + override: true |
| 118 | + - uses: actions-rs/cargo@v1 |
| 119 | + with: |
| 120 | + command: test |
| 121 | + args: --release |
| 122 | + - uses: actions-rs/cargo@v1 |
| 123 | + with: |
| 124 | + command: build |
| 125 | + args: --all --release |
| 126 | + - run: strip target/release/scry && mv target/release/scry target/release/scry_darwin |
| 127 | + - uses: softprops/action-gh-release@v1 |
| 128 | + with: |
| 129 | + files: | |
| 130 | + target/release/scry_darwin |
| 131 | + draft: true |
| 132 | + env: |
| 133 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 134 | + |
| 135 | + release-windows: |
| 136 | + if: startsWith(github.ref, 'refs/tags/') |
| 137 | + needs: [check, test, fmt, clippy] |
| 138 | + name: Release Windows |
| 139 | + runs-on: macos-latest |
| 140 | + steps: |
| 141 | + - uses: actions/checkout@v2 |
| 142 | + - uses: actions-rs/toolchain@v1 |
| 143 | + with: |
| 144 | + profile: minimal |
| 145 | + toolchain: stable |
| 146 | + override: true |
| 147 | + - uses: actions-rs/cargo@v1 |
| 148 | + with: |
| 149 | + command: test |
| 150 | + args: --release |
| 151 | + - uses: actions-rs/cargo@v1 |
| 152 | + with: |
| 153 | + command: build |
| 154 | + args: --all --release |
| 155 | + - run: strip target/release/scry && mv target/release/scry target/release/scry.exe |
| 156 | + - uses: softprops/action-gh-release@v1 |
| 157 | + with: |
| 158 | + files: | |
| 159 | + target/release/scry.exe |
| 160 | + draft: true |
92 | 161 | env: |
93 | 162 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments