-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.64 KB
/
publish-retry.yml
File metadata and controls
68 lines (58 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Publish Retry
on:
workflow_dispatch:
inputs:
tag:
description: "Git tag to check out (e.g. v0.5.0)"
required: false
type: string
default: ""
resume_from:
description: "Crate name to resume from (skip earlier crates)"
required: false
type: string
default: ""
dry_run:
description: "Dry-run only (publish-check instead of publish)"
required: false
type: boolean
default: false
concurrency:
group: publish-retry
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 180
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.tag || github.ref }}
- uses: dtolnay/rust-toolchain@stable
- name: Install NASM (for aws-lc-rs)
run: sudo apt-get update && sudo apt-get install -y nasm
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Publish crates
if: ${{ !inputs.dry_run }}
run: |
if [ -n "${{ inputs.resume_from }}" ]; then
cargo xtask publish --from "${{ inputs.resume_from }}"
else
cargo xtask publish
fi
- name: Publish dry-run
if: ${{ inputs.dry_run }}
run: cargo xtask publish-check
- name: Upload publish state
if: always()
uses: actions/upload-artifact@v7
with:
name: publish-state
path: target/xtask/publish-state.json
if-no-files-found: ignore