Compare commits

..

3 commits

Author SHA1 Message Date
9afa5ff0cc
ci: set registry on internal deps correctly
All checks were successful
CI / Test (push) Successful in 4m9s
2024-03-23 00:40:54 +01:00
6598a23d06
fix: specify internal dependency versions 2024-03-23 00:24:41 +01:00
0bcced1db3
chore: changes to release command 2024-03-23 00:19:33 +01:00
4 changed files with 14 additions and 16 deletions

View file

@ -23,11 +23,13 @@ jobs:
echo END_OF_FILE echo END_OF_FILE
} >> "$GITHUB_ENV" } >> "$GITHUB_ENV"
- name: 📤 Publish crate - name: 📤 Publish crate on code.thetadev.de
run: | run: |
mkdir -p ~/.cargo mkdir -p ~/.cargo
printf '[registries.thetadev]\nindex = "https://code.thetadev.de/ThetaDev/_cargo-index.git"\ntoken = "Bearer ${{ secrets.TOKEN_GITEA }}"\n' >> ~/.cargo/config.toml printf '[registries.thetadev]\nindex = "https://code.thetadev.de/ThetaDev/_cargo-index.git"\ntoken = "Bearer ${{ secrets.TOKEN_GITEA }}"\n' >> ~/.cargo/config.toml
sed -i "s/^rustypipe.*=\s*{/\0 registry = \"thetadev\",/g" Cargo.toml
cargo publish --registry thetadev --package "${{ env.CRATE }}" cargo publish --registry thetadev --package "${{ env.CRATE }}"
git restore Cargo.toml
- name: 🎉 Publish release - name: 🎉 Publish release
uses: https://gitea.com/actions/release-action@main uses: https://gitea.com/actions/release-action@main

View file

@ -63,8 +63,8 @@ insta = { version = "1.17.1", features = ["ron", "redactions"] }
path_macro = "1.0.0" path_macro = "1.0.0"
# Included crates # Included crates
rustypipe = { path = ".", default-features = false } rustypipe = { path = ".", version = "0.1.0", default-features = false }
rustypipe-downloader = { path = "./downloader", default-features = false } rustypipe-downloader = { path = "./downloader", version = "0.1.0", default-features = false }
[features] [features]
default = ["default-tls"] default = ["default-tls"]

View file

@ -51,7 +51,6 @@ release crate="rustypipe":
CRATE="{{crate}}" CRATE="{{crate}}"
INCLUDES='--include-path README.md --include-path LICENSE --include-path Cargo.toml' INCLUDES='--include-path README.md --include-path LICENSE --include-path Cargo.toml'
CHANGELOG="CHANGELOG.md" CHANGELOG="CHANGELOG.md"
CARGO_TOML="Cargo.toml"
if [ "$CRATE" = "rustypipe" ]; then if [ "$CRATE" = "rustypipe" ]; then
INCLUDES="$INCLUDES --include-path src/** --include-path tests/** --include-path testfiles/**" INCLUDES="$INCLUDES --include-path src/** --include-path tests/** --include-path testfiles/**"
@ -61,19 +60,16 @@ release crate="rustypipe":
fi fi
INCLUDES="$INCLUDES --include-path $CRATE/**" INCLUDES="$INCLUDES --include-path $CRATE/**"
CHANGELOG="$CRATE/$CHANGELOG" CHANGELOG="$CRATE/$CHANGELOG"
CARGO_TOML="$CRATE/Cargo.toml"
CRATE="rustypipe-$CRATE" # Add crate name prefix CRATE="rustypipe-$CRATE" # Add crate name prefix
fi fi
VERSION=$(git-cliff $INCLUDES --bumped-version | grep -Po '\d+\.\d+\.\d+$') VERSION=$(cargo pkgid --package "$CRATE" | tr '#@' '\n' | tail -n 1)
echo "Releasing $VERSION:" TAG="${CRATE}/v${VERSION}"
echo "Releasing $TAG:"
if [ -n "$(git status --porcelain)" ]; then echo "Workdir must be clean"; exit 1; fi if git rev-parse "$TAG" >/dev/null 2>&1; then echo "version tag $TAG already exists"; exit 1; fi
if git rev-parse "${CRATE}/v${VERSION}" >/dev/null 2>&1; then echo "version tag v${VERSION} already exists"; exit 1; fi
cargo semver -c "$CARGO_TOML" set "$VERSION" CLIFF_ARGS="--tag v${VERSION} --tag-pattern ${CRATE}/* --unreleased $INCLUDES"
CLIFF_ARGS="--tag v${VERSION} --unreleased $INCLUDES"
echo "git-cliff $CLIFF_ARGS" echo "git-cliff $CLIFF_ARGS"
if [ -f "$CHANGELOG" ]; then if [ -f "$CHANGELOG" ]; then
git-cliff $CLIFF_ARGS --prepend "$CHANGELOG" git-cliff $CLIFF_ARGS --prepend "$CHANGELOG"
@ -83,7 +79,9 @@ release crate="rustypipe":
editor "$CHANGELOG" editor "$CHANGELOG"
git add "$CHANGELOG" "$CARGO_TOML" git add "$CHANGELOG"
git commit -m "chore(release): release $CRATE v$VERSION" git commit -m "chore(release): release $CRATE v$VERSION"
awk 'BEGIN{RS="(^|\n)## [^\n]+\n*"} NR==2 { print }' "$CHANGELOG" | git tag -as -F - --cleanup whitespace "${CRATE}/v${VERSION}" awk 'BEGIN{RS="(^|\n)## [^\n]+\n*"} NR==2 { print }' "$CHANGELOG" | git tag -as -F - --cleanup whitespace "$TAG"
echo "🚀 Run 'git push origin $TAG' to publish"

View file

@ -1,7 +1,5 @@
# RustyPipe # RustyPipe
[![CI status](https://ci.thetadev.de/api/badges/ThetaDev/rustypipe/status.svg)](https://ci.thetadev.de/ThetaDev/rustypipe)
Client for the public YouTube / YouTube Music API (Innertube), inspired by Client for the public YouTube / YouTube Music API (Innertube), inspired by
[NewPipe](https://github.com/TeamNewPipe/NewPipeExtractor). [NewPipe](https://github.com/TeamNewPipe/NewPipeExtractor).