-
Notifications
You must be signed in to change notification settings - Fork 822
34 lines (28 loc) · 840 Bytes
/
release.yml
File metadata and controls
34 lines (28 loc) · 840 Bytes
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
name: publish on release creation
on:
release:
types:
- created
workflow_dispatch:
jobs:
publish-crates:
name: Publish librespot
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
- name: Verify librespot workspace
run: cargo publish --workspace --dry-run
- name: Publish librespot workspace
if: ${{ !env.ACT }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --workspace