Debian Codegraph @

.github/workflows/deploy.yml

raw
1 name: Deploy
2 on:
3 release:
4 types: [created]
5
6 defaults:
7 run:
8 shell: bash
9
10 permissions:
11 contents: write
12
13 jobs:
14 release:
15 runs-on: ${{ matrix.os }}
16 strategy:
17 matrix:
18 include:
19 - target: aarch64-unknown-linux-musl
20 os: ubuntu-22.04
21 - target: x86_64-unknown-linux-gnu
22 os: ubuntu-22.04
23 - target: x86_64-unknown-linux-musl
24 os: ubuntu-22.04
25 - target: x86_64-apple-darwin
26 os: macos-latest
27 - target: aarch64-apple-darwin
28 os: macos-latest
29 - target: x86_64-pc-windows-msvc
30 os: windows-latest
31 name: Deploy ${{ matrix.target }}
32 steps:
33 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
34 - name: Install Rust
35 run: ci/install-rust.sh stable ${{ matrix.target }}
36 - name: Build asset
37 run: ci/make-release-asset.sh ${{ matrix.os }} ${{ matrix.target }}
38 - name: Update release with new asset
39 env:
40 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 run: gh release upload $MDBOOK_TAG $MDBOOK_ASSET
42 pages:
43 name: GitHub Pages
44 runs-on: ubuntu-latest
45 steps:
46 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
47 - name: Install Rust (rustup)
48 run: rustup update stable --no-self-update && rustup default stable
49 - name: Deploy the User Guide to GitHub Pages using the gh-pages branch
50 run: ci/publish-guide.sh
51 publish:
52 name: Publish to crates.io
53 runs-on: ubuntu-latest
54 permissions:
55 # Required for OIDC token exchange
56 id-token: write
57 environment: publish
58 steps:
59 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
60 - name: Install Rust (rustup)
61 run: rustup update stable --no-self-update && rustup default stable
62 - name: Authenticate with crates.io
63 id: auth
64 uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5
65 - name: Publish
66 env:
67 CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
68 run: cargo publish --workspace --no-verify