fork/static-web-server

git clone https://git.julia.blue/fork/static-web-server

Jose Quintanarefactor: update github ci workflows (#514)1c4929d

allow-symlink
1.0 KiB39 linesraw
1name: release-crate
2on:
3  release:
4    types:
5      - published
6
7jobs:
8  check-secret:
9    runs-on: ubuntu-22.04
10    if: contains(github.ref, 'v2.')
11    environment: crates-io-static-web-server
12    outputs:
13      publish: ${{ steps.check.outputs.publish }}
14    steps:
15      - id: check
16        env:
17          CRATES_TOKEN: "${{ secrets.CRATES_TOKEN }}"
18        if: "${{ env.CRATES_TOKEN != '' }}"
19        run: echo "publish=true" >> $GITHUB_OUTPUT
20
21  publish:
22    needs: check-secret
23    runs-on: ubuntu-22.04
24    if: needs.check-secret.outputs.publish == 'true'
25    environment: crates-io-static-web-server
26    steps:
27      - name: Checkout
28        uses: actions/checkout@v4
29        with:
30          fetch-depth: 1
31
32      - name: Install stable toolchain
33        uses: dtolnay/rust-toolchain@nightly
34
35      - name: Publish workspace packages
36        env:
37          CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
38          RUSTDOCFLAGS: '--cfg=docsrs --deny=warnings'
39        run: cargo publish --all-features --package static-web-server