aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/actions/github-release/Dockerfile8
-rw-r--r--.github/actions/github-release/README.md21
-rw-r--r--.github/actions/github-release/action.yml15
-rw-r--r--.github/actions/github-release/main.js117
-rw-r--r--.github/actions/github-release/package.json10
-rw-r--r--.github/workflows/ci.yaml149
-rw-r--r--.github/workflows/release.yaml265
-rw-r--r--.github/workflows/rustdoc.yaml42
8 files changed, 354 insertions, 273 deletions
diff --git a/.github/actions/github-release/Dockerfile b/.github/actions/github-release/Dockerfile
new file mode 100644
index 000000000..5849eac7d
--- /dev/null
+++ b/.github/actions/github-release/Dockerfile
@@ -0,0 +1,8 @@
1FROM node:slim
2
3COPY . /action
4WORKDIR /action
5
6RUN npm install --production
7
8ENTRYPOINT ["node", "/action/main.js"]
diff --git a/.github/actions/github-release/README.md b/.github/actions/github-release/README.md
new file mode 100644
index 000000000..7b50d0020
--- /dev/null
+++ b/.github/actions/github-release/README.md
@@ -0,0 +1,21 @@
1# github-release
2
3Copy-pasted from
4https://github.com/bytecodealliance/wasmtime/tree/8acfdbdd8aa550d1b84e0ce1e6222a6605d14e38/.github/actions/github-release
5
6An action used to publish GitHub releases for `wasmtime`.
7
8As of the time of this writing there's a few actions floating around which
9perform github releases but they all tend to have their set of drawbacks.
10Additionally nothing handles deleting releases which we need for our rolling
11`dev` release.
12
13To handle all this this action rolls-its-own implementation using the
14actions/toolkit repository and packages published there. These run in a Docker
15container and take various inputs to orchestrate the release from the build.
16
17More comments can be found in `main.js`.
18
19Testing this is really hard. If you want to try though run `npm install` and
20then `node main.js`. You'll have to configure a bunch of env vars though to get
21anything reasonably working.
diff --git a/.github/actions/github-release/action.yml b/.github/actions/github-release/action.yml
new file mode 100644
index 000000000..51a074adf
--- /dev/null
+++ b/.github/actions/github-release/action.yml
@@ -0,0 +1,15 @@
1name: 'wasmtime github releases'
2description: 'wasmtime github releases'
3inputs:
4 token:
5 description: ''
6 required: true
7 name:
8 description: ''
9 required: true
10 files:
11 description: ''
12 required: true
13runs:
14 using: 'docker'
15 image: 'Dockerfile'
diff --git a/.github/actions/github-release/main.js b/.github/actions/github-release/main.js
new file mode 100644
index 000000000..295c02626
--- /dev/null
+++ b/.github/actions/github-release/main.js
@@ -0,0 +1,117 @@
1const core = require('@actions/core');
2const path = require("path");
3const fs = require("fs");
4const github = require('@actions/github');
5const glob = require('glob');
6
7function sleep(milliseconds) {
8 return new Promise(resolve => setTimeout(resolve, milliseconds))
9}
10
11async function runOnce() {
12 // Load all our inputs and env vars. Note that `getInput` reads from `INPUT_*`
13 const files = core.getInput('files');
14 const name = core.getInput('name');
15 const token = core.getInput('token');
16 const slug = process.env.GITHUB_REPOSITORY;
17 const owner = slug.split('/')[0];
18 const repo = slug.split('/')[1];
19 const sha = process.env.GITHUB_SHA;
20
21 core.info(`files: ${files}`);
22 core.info(`name: ${name}`);
23 core.info(`token: ${token}`);
24
25 const octokit = new github.GitHub(token);
26
27 // Delete the previous release since we can't overwrite one. This may happen
28 // due to retrying an upload or it may happen because we're doing the dev
29 // release.
30 const releases = await octokit.paginate("GET /repos/:owner/:repo/releases", { owner, repo });
31 for (const release of releases) {
32 if (release.tag_name !== name) {
33 continue;
34 }
35 const release_id = release.id;
36 core.info(`deleting release ${release_id}`);
37 await octokit.repos.deleteRelease({ owner, repo, release_id });
38 }
39
40 // We also need to update the `dev` tag while we're at it on the `dev` branch.
41 if (name == 'nightly') {
42 try {
43 core.info(`updating nightly tag`);
44 await octokit.git.updateRef({
45 owner,
46 repo,
47 ref: 'tags/nightly',
48 sha,
49 force: true,
50 });
51 } catch (e) {
52 console.log("ERROR: ", JSON.stringify(e, null, 2));
53 core.info(`creating nightly tag`);
54 await octokit.git.createTag({
55 owner,
56 repo,
57 tag: 'nightly',
58 message: 'nightly release',
59 object: sha,
60 type: 'commit',
61 });
62 }
63 }
64
65 // Creates an official GitHub release for this `tag`, and if this is `dev`
66 // then we know that from the previous block this should be a fresh release.
67 core.info(`creating a release`);
68 const release = await octokit.repos.createRelease({
69 owner,
70 repo,
71 tag_name: name,
72 prerelease: name === 'nightly',
73 });
74
75 // Upload all the relevant assets for this release as just general blobs.
76 for (const file of glob.sync(files)) {
77 const size = fs.statSync(file).size;
78 core.info(`upload ${file}`);
79 await octokit.repos.uploadReleaseAsset({
80 data: fs.createReadStream(file),
81 headers: { 'content-length': size, 'content-type': 'application/octet-stream' },
82 name: path.basename(file),
83 url: release.data.upload_url,
84 });
85 }
86}
87
88async function run() {
89 const retries = 10;
90 for (let i = 0; i < retries; i++) {
91 try {
92 await runOnce();
93 break;
94 } catch (e) {
95 if (i === retries - 1)
96 throw e;
97 logError(e);
98 console.log("RETRYING after 10s");
99 await sleep(10000)
100 }
101 }
102}
103
104function logError(e) {
105 console.log("ERROR: ", e.message);
106 try {
107 console.log(JSON.stringify(e, null, 2));
108 } catch (e) {
109 // ignore json errors for now
110 }
111 console.log(e.stack);
112}
113
114run().catch(err => {
115 logError(err);
116 core.setFailed(err.message);
117});
diff --git a/.github/actions/github-release/package.json b/.github/actions/github-release/package.json
new file mode 100644
index 000000000..abfc55f6f
--- /dev/null
+++ b/.github/actions/github-release/package.json
@@ -0,0 +1,10 @@
1{
2 "name": "wasmtime-github-release",
3 "version": "0.0.0",
4 "main": "main.js",
5 "dependencies": {
6 "@actions/core": "^1.0.0",
7 "@actions/github": "^1.0.0",
8 "glob": "^7.1.5"
9 }
10}
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 50c4265cf..633015956 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -3,28 +3,30 @@ on:
3 pull_request: 3 pull_request:
4 push: 4 push:
5 branches: 5 branches:
6 - master 6 - master
7 - staging 7 - staging
8 - trying 8 - trying
9 9
10jobs: 10jobs:
11 rust-audit: 11 rust-audit:
12 name: Audit Rust vulnerabilities 12 name: Audit Rust vulnerabilities
13 runs-on: ubuntu-latest 13 runs-on: ubuntu-latest
14 steps: 14 steps:
15 - name: Checkout repository 15 - name: Checkout repository
16 uses: actions/checkout@v1 16 uses: actions/checkout@v1
17 17
18 - run: cargo install cargo-audit 18 - run: cargo install cargo-audit
19 - run: cargo audit 19 - run: cargo audit
20 20
21 rust: 21 rust:
22 name: Rust 22 name: Rust
23 runs-on: ${{ matrix.os }} 23 runs-on: ${{ matrix.os }}
24
24 strategy: 25 strategy:
25 fail-fast: false 26 fail-fast: false
26 matrix: 27 matrix:
27 os: [ubuntu-latest, windows-latest, macos-latest] 28 os: [ubuntu-latest, windows-latest, macos-latest]
29
28 env: 30 env:
29 RUSTFLAGS: -D warnings 31 RUSTFLAGS: -D warnings
30 CC: deny_c 32 CC: deny_c
@@ -32,62 +34,57 @@ jobs:
32 RUN_SLOW_TESTS: 1 34 RUN_SLOW_TESTS: 1
33 RUSTUP_MAX_RETRIES: 10 35 RUSTUP_MAX_RETRIES: 10
34 CARGO_NET_RETRY: 10 36 CARGO_NET_RETRY: 10
35 steps:
36 37
37 - name: Checkout repository 38 steps:
38 uses: actions/checkout@v1 39 - name: Checkout repository
39 40 uses: actions/checkout@v1
40 # We need to disable the existing toolchain to avoid updating rust-docs 41
41 # which takes a long time. The fastest way to do this is to rename the 42 # We need to disable the existing toolchain to avoid updating rust-docs
42 # existing folder, as deleting it takes about as much time as not doing 43 # which takes a long time. The fastest way to do this is to rename the
43 # anything and just updating rust-docs. 44 # existing folder, as deleting it takes about as much time as not doing
44 - name: Rename existing rust toolchain (Windows) 45 # anything and just updating rust-docs.
45 if: matrix.os == 'windows-latest' 46 - name: Rename existing rust toolchain (Windows)
46 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old 47 if: matrix.os == 'windows-latest'
47 48 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
48 - name: Install Rust toolchain 49
49 uses: actions-rs/toolchain@v1 50 - name: Install Rust toolchain
50 with: 51 uses: actions-rs/toolchain@v1
51 toolchain: stable 52 with:
52 profile: minimal 53 toolchain: stable
53 override: true 54 profile: minimal
54 components: rustfmt, rust-src 55 override: true
55 56 components: rustfmt, rust-src
56 - name: Cache cargo registry 57
57 uses: actions/cache@v1 58 - name: Cache cargo registry
58 with: 59 uses: actions/cache@v1
59 path: ~/.cargo/registry 60 with:
60 key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} 61 path: ~/.cargo/registry
61 62 key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
62 - name: Cache cargo index 63
63 uses: actions/cache@v1 64 - name: Cache cargo index
64 with: 65 uses: actions/cache@v1
65 path: ~/.cargo/git 66 with:
66 key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} 67 path: ~/.cargo/git
67 68 key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
68 - name: Cache cargo target dir 69
69 uses: actions/cache@v1 70 - name: Cache cargo target dir
70 with: 71 uses: actions/cache@v1
71 path: target 72 with:
72 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} 73 path: target
73 74 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
74 - name: Compile 75
75 uses: actions-rs/cargo@v1 76 - name: Compile
76 with: 77 run: cargo test --no-run
77 command: test 78
78 args: --no-run 79 - name: Test
79 80 run: cargo test
80 - name: Test 81
81 uses: actions-rs/cargo@v1 82 - name: Prepare cache
82 with: 83 run: cargo xtask pre-cache
83 command: test 84
84 85 - name: Prepare cache 2
85 - name: Prepare cache 86 if: matrix.os == 'windows-latest'
86 run: cargo xtask pre-cache 87 run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe
87
88 - name: Prepare cache 2
89 if: matrix.os == 'windows-latest'
90 run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe
91 88
92 typescript: 89 typescript:
93 name: TypeScript 90 name: TypeScript
@@ -96,22 +93,22 @@ jobs:
96 CXX: g++-4.9 93 CXX: g++-4.9
97 CC: gcc-4.9 94 CC: gcc-4.9
98 steps: 95 steps:
99 - name: Checkout repository 96 - name: Checkout repository
100 uses: actions/checkout@v1 97 uses: actions/checkout@v1
101 98
102 - name: Install Nodejs 99 - name: Install Nodejs
103 uses: actions/setup-node@v1 100 uses: actions/setup-node@v1
104 with: 101 with:
105 node-version: 12.x 102 node-version: 12.x
106 103
107 - run: npm ci 104 - run: npm ci
108 working-directory: ./editors/code 105 working-directory: ./editors/code
109 106
110 - run: npm audit 107 - run: npm audit
111 working-directory: ./editors/code 108 working-directory: ./editors/code
112 109
113 - run: npm run lint 110 - run: npm run lint
114 working-directory: ./editors/code 111 working-directory: ./editors/code
115 112
116 - run: npm run package --scripts-prepend-node-path 113 - run: npm run package --scripts-prepend-node-path
117 working-directory: ./editors/code 114 working-directory: ./editors/code
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index a697c0071..8100c04ef 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -1,193 +1,110 @@
1name: release 1name: release
2on: 2on:
3 schedule:
4 - cron: '*/15 * * * *' # midnight UTC
5
3 push: 6 push:
4 branches: 7 branches:
5 - release 8 - release
6 9
7jobs: 10jobs:
8 build-server: 11 dist:
9 name: build-server 12 name: dist
10 runs-on: ${{ matrix.os }} 13 runs-on: ${{ matrix.os }}
11 strategy: 14 strategy:
12 matrix: 15 matrix:
13 os: [ubuntu-latest, windows-latest, macos-latest] 16 os: [ubuntu-latest, windows-latest, macos-latest]
17
14 env: 18 env:
15 RUSTFLAGS: -D warnings 19 RUSTFLAGS: -D warnings
16 CARGO_INCREMENTAL: 0 20 CARGO_INCREMENTAL: 0
17 RUSTUP_MAX_RETRIES: 10 21 RUSTUP_MAX_RETRIES: 10
18 CARGO_NET_RETRY: 10 22 CARGO_NET_RETRY: 10
19 steps:
20 23
21 - name: Checkout repository
22 uses: actions/checkout@v1
23
24 # We need to disable the existing toolchain to avoid updating rust-docs
25 # which takes a long time. The fastest way to do this is to rename the
26 # existing folder, as deleting it takes about as much time as not doing
27 # anything and just updating rust-docs.
28 - name: Rename existing rust toolchain (Windows)
29 if: matrix.os == 'windows-latest'
30 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
31
32 - name: Install Rust toolchain
33 uses: actions-rs/toolchain@v1
34 with:
35 toolchain: stable
36 profile: minimal
37 target: x86_64-unknown-linux-musl
38 override: true
39
40 - name: Build
41 if: matrix.os == 'ubuntu-latest'
42 uses: actions-rs/cargo@v1
43 env:
44 CC: clang
45 with:
46 command: build
47 args: --package rust-analyzer --bin rust-analyzer --release --target x86_64-unknown-linux-musl
48
49 - name: Build
50 if: matrix.os != 'ubuntu-latest'
51 uses: actions-rs/cargo@v1
52 with:
53 command: build
54 args: --package rust-analyzer --bin rust-analyzer --release
55
56 - name: Create distribution dir
57 run: mkdir ./dist
58
59 - name: Copy binary
60 if: matrix.os == 'ubuntu-latest'
61 run: cp ./target/x86_64-unknown-linux-musl/release/rust-analyzer ./dist/rust-analyzer-linux && strip ./dist/rust-analyzer-linux
62
63 - name: Copy binary
64 if: matrix.os == 'macos-latest'
65 run: cp ./target/release/rust-analyzer ./dist/rust-analyzer-mac
66
67 - name: Copy binary
68 if: matrix.os == 'windows-latest'
69 run: copy ./target/release/rust-analyzer.exe ./dist/rust-analyzer-windows.exe
70
71 - name: Upload artifacts
72 uses: actions/upload-artifact@v1
73 with:
74 name: server-${{ matrix.os }}
75 path: ./dist
76
77 build-clients:
78 name: build-clients
79 runs-on: ubuntu-latest
80 steps: 24 steps:
81 - name: Checkout repository 25 - name: Checkout repository
82 uses: actions/checkout@v1 26 uses: actions/checkout@v1
83 27
84 - name: Install Nodejs 28 # We need to disable the existing toolchain to avoid updating rust-docs
85 uses: actions/setup-node@v1 29 # which takes a long time. The fastest way to do this is to rename the
86 with: 30 # existing folder, as deleting it takes about as much time as not doing
87 node-version: 12.x 31 # anything and just updating rust-docs.
88 32 - name: Rename existing rust toolchain (Windows)
89 - run: npm ci 33 if: matrix.os == 'windows-latest'
90 working-directory: ./editors/code 34 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
91 35
92 - run: npm run package --scripts-prepend-node-path 36 - name: Install Rust toolchain
93 working-directory: ./editors/code 37 uses: actions-rs/toolchain@v1
94 38 with:
95 - name: Copy vscode extension 39 toolchain: stable
96 run: mkdir -p ./dist/code && cp ./editors/code/rust-analyzer.vsix ./dist/ 40 profile: minimal
97 41 target: x86_64-unknown-linux-musl
98 - name: Upload artifacts 42 override: true
99 uses: actions/upload-artifact@v1 43
100 with: 44 - name: Install Nodejs
101 name: editor-plugins 45 uses: actions/setup-node@v1
102 path: ./dist 46 with:
103 47 node-version: 12.x
104 make-release: 48
105 name: make-release 49 - name: Dist
50 if: github.event_name == 'push'
51 run: cargo xtask dist
52
53 - name: Dist
54 if: github.event_name != 'push'
55 run: cargo xtask dist --nightly
56
57 - name: Upload artifacts
58 uses: actions/upload-artifact@v1
59 with:
60 name: dist-${{ matrix.os }}
61 path: ./dist
62
63 publish:
64 name: publish
106 runs-on: ubuntu-latest 65 runs-on: ubuntu-latest
107 needs: ['build-server', 'build-clients'] 66 needs: ['dist']
108 steps: 67 steps:
109 - name: Install Nodejs 68 - name: Install Nodejs
110 uses: actions/setup-node@v1 69 uses: actions/setup-node@v1
111 with: 70 with:
112 node-version: 12.x 71 node-version: 12.x
113 72
114 - run: echo "::set-env name=TAG::$(date --iso)" 73 - run: echo "::set-env name=TAG::$(date --iso)"
115 - run: 'echo "TAG: $TAG"' 74 if: github.event_name == 'push'
116 75 - run: echo "::set-env name=TAG::nightly"
117 - name: Checkout repository 76 if: github.event_name == 'schedule'
118 uses: actions/checkout@v1 77 - run: 'echo "TAG: $TAG"'
119 78
120 - uses: actions/download-artifact@v1 79 - name: Checkout repository
121 with: 80 uses: actions/checkout@v1
122 name: editor-plugins 81
123 path: dist 82 - uses: actions/download-artifact@v1
124 - uses: actions/download-artifact@v1 83 with:
125 with: 84 name: dist-macos-latest
126 name: server-macos-latest 85 path: dist
127 path: dist 86 - uses: actions/download-artifact@v1
128 - uses: actions/download-artifact@v1 87 with:
129 with: 88 name: dist-ubuntu-latest
130 name: server-ubuntu-latest 89 path: dist
131 path: dist 90 - uses: actions/download-artifact@v1
132 - uses: actions/download-artifact@v1 91 with:
133 with: 92 name: dist-windows-latest
134 name: server-windows-latest 93 path: dist
135 path: dist 94 - run: ls -all ./dist
136 - run: ls -all ./dist 95
137 96 - name: Publish Release
138 - name: Create Release 97 uses: ./.github/actions/github-release
139 id: create_release 98 with:
140 # uses: actions/create-release@v1 99 files: "dist/*"
141 # https://github.com/actions/create-release/pull/32 100 name: ${{ env.TAG }}
142 uses: fleskesvor/create-release@1a72e235c178bf2ae6c51a8ae36febc24568c5fe 101 token: ${{ secrets.GITHUB_TOKEN }}
143 env: 102
144 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 103 - run: npm ci
145 with: 104 working-directory: ./editors/code
146 tag_name: ${{ env.TAG }} 105
147 release_name: ${{ env.TAG }} 106 - name: Publish Extension
148 draft: false 107 if: github.event_name == 'push'
149 prerelease: false 108 working-directory: ./editors/code
150 109 # token from https://dev.azure.com/rust-analyzer/
151 - uses: actions/[email protected] 110 run: npx vsce publish 0.1.$(date +%Y%m%d) --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer.vsix
152 env:
153 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154 with:
155 upload_url: ${{ steps.create_release.outputs.upload_url }}
156 asset_path: ./dist/rust-analyzer-linux
157 asset_name: rust-analyzer-linux
158 asset_content_type: application/octet-stream
159
160 - uses: actions/[email protected]
161 env:
162 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163 with:
164 upload_url: ${{ steps.create_release.outputs.upload_url }}
165 asset_path: ./dist/rust-analyzer-mac
166 asset_name: rust-analyzer-mac
167 asset_content_type: application/octet-stream
168
169 - uses: actions/[email protected]
170 env:
171 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172 with:
173 upload_url: ${{ steps.create_release.outputs.upload_url }}
174 asset_path: ./dist/rust-analyzer-windows.exe
175 asset_name: rust-analyzer-windows.exe
176 asset_content_type: application/octet-stream
177
178 - uses: actions/[email protected]
179 env:
180 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181 with:
182 upload_url: ${{ steps.create_release.outputs.upload_url }}
183 asset_path: ./dist/rust-analyzer.vsix
184 asset_name: rust-analyzer.vsix
185 asset_content_type: application/octet-stream
186
187 - run: npm ci
188 working-directory: ./editors/code
189
190 - name: Publish Extension
191 working-directory: ./editors/code
192 # token from https://dev.azure.com/rust-analyzer/
193 run: npx vsce publish 0.1.$(date +%Y%m%d) --pat ${{ secrets.MARKETPLACE_TOKEN }}
diff --git a/.github/workflows/rustdoc.yaml b/.github/workflows/rustdoc.yaml
index caa1dcc30..e75e92695 100644
--- a/.github/workflows/rustdoc.yaml
+++ b/.github/workflows/rustdoc.yaml
@@ -2,7 +2,7 @@ name: rustdoc
2on: 2on:
3 push: 3 push:
4 branches: 4 branches:
5 - master 5 - master
6 6
7jobs: 7jobs:
8 rustdoc: 8 rustdoc:
@@ -12,28 +12,24 @@ jobs:
12 CARGO_INCREMENTAL: 0 12 CARGO_INCREMENTAL: 0
13 13
14 steps: 14 steps:
15 - name: Checkout repository 15 - name: Checkout repository
16 uses: actions/checkout@v1 16 uses: actions/checkout@v1
17 17
18 - name: Install Rust toolchain 18 - name: Install Rust toolchain
19 uses: actions-rs/toolchain@v1 19 uses: actions-rs/toolchain@v1
20 with: 20 with:
21 toolchain: stable 21 toolchain: stable
22 profile: minimal 22 profile: minimal
23 override: true 23 override: true
24 components: rustfmt, rust-src 24 components: rustfmt, rust-src
25 25
26 - name: Build Documentation 26 - name: Build Documentation
27 uses: actions-rs/cargo@v1 27 run: cargo doc --all --no-deps
28 with:
29 command: doc
30 args: --all --no-deps
31 28
32 - name: Deploy Docs 29 - name: Deploy Docs
33 uses: peaceiris/[email protected] 30 uses: peaceiris/actions-gh-pages@364c31d33bb99327c77b3a5438a83a357a6729ad # v3.4.0
34 env: 31 with:
35 ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} 32 github_token: ${{ secrets.GITHUB_TOKEN }}
36 PUBLISH_BRANCH: gh-pages 33 publish_branch: gh-pages
37 PUBLISH_DIR: ./target/doc 34 publish_dir: ./target/doc
38 with: 35 force_orphan: true
39 forceOrphan: true