-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 2.9 KB
/
Copy pathrelease.yml
File metadata and controls
62 lines (59 loc) · 2.9 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
name: Release
on:
release:
types: [published]
workflow_dispatch: {}
permissions:
contents: write
id-token: write
attestations: write
jobs:
release:
uses: ractive/release-workflows/.github/workflows/release.yml@v0.2.0
secrets: inherit
with:
bin-name: ff-rdp
version-package: ff-rdp-cli
publish-crates: ff-rdp-core,ff-rdp-cli
winget-identifier: ractive.ff-rdp
# SBOMs for both published crates, matching the pre-migration pipeline:
sbom-packages: ff-rdp-cli,ff-rdp-core
enable-linux-packages: true
linux-package-crate: ff-rdp-cli
# Publishes the .deb/.rpm to the hosted apt/yum repos at Cloudsmith
# (non-blocking; needs the CLOUDSMITH_API_KEY repo secret):
cloudsmith-repo: ractive/ff-rdp
# Publishes a -bin PKGBUILD to the AUR (non-blocking; needs the
# AUR_SSH_PRIVATE_KEY repo secret):
aur-package: ff-rdp-bin
extra-archive-paths: completions
# Runs on every matrix target and again in the linux-packages job.
# Non-runnable targets (CROSS=true, or aarch64-pc-windows-msvc which
# cross-compiles natively on the Windows x86_64 host) can't execute
# their own binary, so those cases fall back to a host build via
# `cargo run --release`.
pre-package-command: |
mkdir -p completions
if [ "$CROSS" = "true" ] || [ "$TARGET" = "aarch64-pc-windows-msvc" ]; then
cargo run --release -p ff-rdp-cli --bin ff-rdp -- completions bash > completions/ff-rdp.bash
cargo run --release -p ff-rdp-cli --bin ff-rdp -- completions zsh > completions/_ff-rdp
cargo run --release -p ff-rdp-cli --bin ff-rdp -- completions fish > completions/ff-rdp.fish
else
"$BIN_PATH" completions bash > completions/ff-rdp.bash
"$BIN_PATH" completions zsh > completions/_ff-rdp
"$BIN_PATH" completions fish > completions/ff-rdp.fish
fi
# cargo-deb / cargo-generate-rpm resolve [package.metadata.*] asset
# paths relative to the crate directory, not the workspace root.
mkdir -p crates/ff-rdp-cli/completions
cp completions/* crates/ff-rdp-cli/completions/
dry-run: ${{ github.event_name == 'workflow_dispatch' }}
targets: >-
[
{"target": "x86_64-unknown-linux-gnu", "os": "ubuntu-latest", "cross": false, "run_tests": true},
{"target": "x86_64-unknown-linux-musl", "os": "ubuntu-latest", "cross": true, "run_tests": false},
{"target": "aarch64-unknown-linux-musl", "os": "ubuntu-latest", "cross": true, "run_tests": false},
{"target": "aarch64-apple-darwin", "os": "macos-latest", "cross": false, "run_tests": true},
{"target": "x86_64-pc-windows-msvc", "os": "windows-latest", "cross": false, "run_tests": false},
{"target": "aarch64-pc-windows-msvc", "os": "windows-latest", "cross": false, "run_tests": false}
]