diff options
author | Aleksey Kladov <[email protected]> | 2020-03-04 17:32:34 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-04 17:32:34 +0000 |
commit | 2722184c6d53de560ff92e7af1f019c822669680 (patch) | |
tree | 7c7bba3328a85b0f4c5d9a3b7d9f3c3e3616b4f4 /.github/workflows | |
parent | ae6109a68ce6980bdaeb3824adfc14417d40aa4a (diff) | |
parent | fd586e58d97e4ac2d2448426cf6c4937b48c5660 (diff) |
Merge pull request #3458 from matklad/dist
cargo xtask dist
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/release.yaml | 43 |
1 files changed, 12 insertions, 31 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index aef961671..f5a07c21f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml | |||
@@ -41,19 +41,27 @@ jobs: | |||
41 | target: x86_64-unknown-linux-musl | 41 | target: x86_64-unknown-linux-musl |
42 | override: true | 42 | override: true |
43 | 43 | ||
44 | - name: Create distribution dir | ||
45 | run: mkdir ./dist | ||
46 | |||
44 | - name: Build | 47 | - name: Build |
45 | if: matrix.os == 'ubuntu-latest' | 48 | if: matrix.os == 'ubuntu-latest' |
46 | run: cargo build --package rust-analyzer --bin rust-analyzer --release --target x86_64-unknown-linux-musl | 49 | run: cargo build --package rust-analyzer --bin rust-analyzer --release --target x86_64-unknown-linux-musl |
47 | env: | 50 | env: |
48 | CC: clang | 51 | CC: clang |
49 | 52 | ||
53 | - name: Build VS Code extension | ||
54 | if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' | ||
55 | run: cargo xtask dist | ||
56 | |||
57 | - name: Build VS Code extension | ||
58 | if: matrix.os == 'ubuntu-latest' && github.event_name != 'push' | ||
59 | run: cargo xtask dist --nightly | ||
60 | |||
50 | - name: Build | 61 | - name: Build |
51 | if: matrix.os != 'ubuntu-latest' | 62 | if: matrix.os != 'ubuntu-latest' |
52 | run: cargo build --package rust-analyzer --bin rust-analyzer --release | 63 | run: cargo build --package rust-analyzer --bin rust-analyzer --release |
53 | 64 | ||
54 | - name: Create distribution dir | ||
55 | run: mkdir ./dist | ||
56 | |||
57 | - name: Copy binary | 65 | - name: Copy binary |
58 | if: matrix.os == 'ubuntu-latest' | 66 | if: matrix.os == 'ubuntu-latest' |
59 | run: cp ./target/x86_64-unknown-linux-musl/release/rust-analyzer ./dist/rust-analyzer-linux && strip ./dist/rust-analyzer-linux | 67 | run: cp ./target/x86_64-unknown-linux-musl/release/rust-analyzer ./dist/rust-analyzer-linux && strip ./dist/rust-analyzer-linux |
@@ -72,33 +80,6 @@ jobs: | |||
72 | name: server-${{ matrix.os }} | 80 | name: server-${{ matrix.os }} |
73 | path: ./dist | 81 | path: ./dist |
74 | 82 | ||
75 | build-clients: | ||
76 | name: build-clients | ||
77 | runs-on: ubuntu-latest | ||
78 | steps: | ||
79 | - name: Checkout repository | ||
80 | uses: actions/checkout@v1 | ||
81 | |||
82 | - name: Install Nodejs | ||
83 | uses: actions/setup-node@v1 | ||
84 | with: | ||
85 | node-version: 12.x | ||
86 | |||
87 | - run: npm ci | ||
88 | working-directory: ./editors/code | ||
89 | |||
90 | - run: npm run package --scripts-prepend-node-path | ||
91 | working-directory: ./editors/code | ||
92 | |||
93 | - name: Copy vscode extension | ||
94 | run: mkdir -p ./dist/code && cp ./editors/code/rust-analyzer.vsix ./dist/ | ||
95 | |||
96 | - name: Upload artifacts | ||
97 | uses: actions/upload-artifact@v1 | ||
98 | with: | ||
99 | name: editor-plugins | ||
100 | path: ./dist | ||
101 | |||
102 | make-release: | 83 | make-release: |
103 | name: make-release | 84 | name: make-release |
104 | runs-on: ubuntu-latest | 85 | runs-on: ubuntu-latest |
@@ -150,4 +131,4 @@ jobs: | |||
150 | if: github.event_name == 'push' | 131 | if: github.event_name == 'push' |
151 | working-directory: ./editors/code | 132 | working-directory: ./editors/code |
152 | # token from https://dev.azure.com/rust-analyzer/ | 133 | # token from https://dev.azure.com/rust-analyzer/ |
153 | run: npx vsce publish 0.1.$(date +%Y%m%d) --pat ${{ secrets.MARKETPLACE_TOKEN }} | 134 | run: npx vsce publish 0.1.$(date +%Y%m%d) --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer.vsix |