Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
create:
tags:
- v*

name: Publish Crate

jobs:
publish:
name: Deploy a new version of Rspotify to crate.io
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Release
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
shell: bash
run: |
# Publishing crates
"${GITHUB_WORKSPACE}/tools/publish.sh"
17 changes: 17 additions & 0 deletions tools/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# If crate A depends on crate B, B must come before A in this list
crates=(
rspotify-macros
rspotify-model
rspotify-http
)

for crate in "${crates[@]}"; do
echo "Publishing ${crate}"
(
cd "$crate"
cargo publish --no-verify
)
sleep 20
done

cargo publish