Skip to content

Commit cd5a9c9

Browse files
committed
Merge remote-tracking branch 'original/master' into localization
2 parents e74fdb1 + 53eccf7 commit cd5a9c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+4898
-1917
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
labels: ["C-bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thanks for filing a 🐛 bug report 😄!
8+
- type: textarea
9+
id: problem
10+
attributes:
11+
label: Problem
12+
description: >
13+
Please provide a clear and concise description of what the bug is,
14+
including what currently happens and what you expected to happen.
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: steps
19+
attributes:
20+
label: Steps
21+
description: Please list the steps to reproduce the bug.
22+
placeholder: |
23+
1.
24+
2.
25+
3.
26+
- type: textarea
27+
id: possible-solutions
28+
attributes:
29+
label: Possible Solution(s)
30+
description: >
31+
Not obligatory, but suggest a fix/reason for the bug,
32+
or ideas how to implement the addition or change.
33+
- type: textarea
34+
id: notes
35+
attributes:
36+
label: Notes
37+
description: Provide any additional notes that might be helpful.
38+
- type: textarea
39+
id: version
40+
attributes:
41+
label: Version
42+
description: >
43+
Please paste the output of running `mdbook --version` or which version
44+
of the library you are using.
45+
render: text
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Enhancement
2+
description: Suggest an idea for enhancing mdBook
3+
labels: ["C-enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for filing a 🙋 feature request 😄!
9+
- type: textarea
10+
id: problem
11+
attributes:
12+
label: Problem
13+
description: >
14+
Please provide a clear description of your use case and the problem
15+
this feature request is trying to solve.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: solution
20+
attributes:
21+
label: Proposed Solution
22+
description: >
23+
Please provide a clear and concise description of what you want to happen.
24+
- type: textarea
25+
id: notes
26+
attributes:
27+
label: Notes
28+
description: Provide any additional context or information that might be helpful.

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Question
2+
description: Have a question on how to use mdBook?
3+
labels: ["C-question"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Got a question on how to do something with mdBook?
9+
- type: textarea
10+
id: question
11+
attributes:
12+
label: Question
13+
description: >
14+
Enter your question here. Please try to provide as much detail as possible.
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: version
19+
attributes:
20+
label: Version
21+
description: >
22+
Please paste the output of running `mdbook --version` or which version
23+
of the library you are using.
24+
render: text

.github/workflows/deploy.yml

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,46 @@ on:
33
release:
44
types: [created]
55

6+
defaults:
7+
run:
8+
shell: bash
9+
10+
permissions:
11+
contents: write
12+
613
jobs:
714
release:
815
name: Deploy Release
916
runs-on: ${{ matrix.os }}
1017
strategy:
1118
matrix:
12-
os: [ubuntu-latest, macos-latest, windows-latest]
19+
target:
20+
- aarch64-unknown-linux-musl
21+
- x86_64-unknown-linux-gnu
22+
- x86_64-unknown-linux-musl
23+
- x86_64-apple-darwin
24+
- x86_64-pc-windows-msvc
25+
include:
26+
- target: aarch64-unknown-linux-musl
27+
os: ubuntu-20.04
28+
- target: x86_64-unknown-linux-gnu
29+
os: ubuntu-20.04
30+
- target: x86_64-unknown-linux-musl
31+
os: ubuntu-20.04
32+
- target: x86_64-apple-darwin
33+
os: macos-latest
34+
- target: x86_64-pc-windows-msvc
35+
os: windows-latest
1336
steps:
1437
- uses: actions/checkout@master
15-
- name: Install hub
16-
run: ci/install-hub.sh ${{ matrix.os }}
17-
shell: bash
1838
- name: Install Rust
19-
run: ci/install-rust.sh stable
20-
shell: bash
21-
- name: Build and deploy artifacts
39+
run: ci/install-rust.sh stable ${{ matrix.target }}
40+
- name: Build asset
41+
run: ci/make-release-asset.sh ${{ matrix.os }} ${{ matrix.target }}
42+
- name: Update release with new asset
2243
env:
2344
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
run: ci/make-release.sh ${{ matrix.os }}
25-
shell: bash
45+
run: gh release upload $MDBOOK_TAG $MDBOOK_ASSET
2646
pages:
2747
name: GitHub Pages
2848
runs-on: ubuntu-latest
@@ -40,3 +60,14 @@ jobs:
4060
curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy
4161
cd guide/book
4262
/tmp/deploy
63+
publish:
64+
name: Publish to crates.io
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@master
68+
- name: Install Rust (rustup)
69+
run: rustup update stable --no-self-update && rustup default stable
70+
- name: Publish
71+
env:
72+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
73+
run: cargo publish --no-verify

.github/workflows/main.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: CI
22
on:
3-
# Only run when merging to master, or open/synchronize/reopen a PR.
4-
push:
5-
branches:
6-
- master
73
pull_request:
4+
merge_group:
85

96
jobs:
107
test:
@@ -30,22 +27,40 @@ jobs:
3027
os: windows-latest
3128
rust: stable
3229
- build: msrv
33-
os: ubuntu-latest
34-
rust: 1.46.0
30+
os: ubuntu-20.04
31+
# sync MSRV with docs: guide/src/guide/installation.md and Cargo.toml
32+
rust: 1.70.0
3533
steps:
36-
- uses: actions/checkout@master
34+
- uses: actions/checkout@v3
3735
- name: Install Rust
3836
run: bash ci/install-rust.sh ${{ matrix.rust }}
3937
- name: Build and run tests
40-
run: cargo test
38+
run: cargo test --locked
4139
- name: Test no default
4240
run: cargo test --no-default-features
4341

4442
rustfmt:
4543
name: Rustfmt
4644
runs-on: ubuntu-latest
4745
steps:
48-
- uses: actions/checkout@master
46+
- uses: actions/checkout@v3
4947
- name: Install Rust
5048
run: rustup update stable && rustup default stable && rustup component add rustfmt
5149
- run: cargo fmt --check
50+
51+
# The success job is here to consolidate the total success/failure state of
52+
# all other jobs. This job is then included in the GitHub branch protection
53+
# rule which prevents merges unless all other jobs are passing. This makes
54+
# it easier to manage the list of jobs via this yml file and to prevent
55+
# accidentally adding new jobs without also updating the branch protections.
56+
success:
57+
name: Success gate
58+
if: always()
59+
needs:
60+
- test
61+
- rustfmt
62+
runs-on: ubuntu-latest
63+
steps:
64+
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
65+
- name: Done
66+
run: exit 0

0 commit comments

Comments
 (0)