Compare commits
No commits in common. "9afa5ff0cc976b98603482ebf6c3aa2e277087c4" and "151dc34f6e3bd441b538f820823ea881591f4e31" have entirely different histories.
9afa5ff0cc
...
151dc34f6e
4 changed files with 16 additions and 14 deletions
|
@ -23,13 +23,11 @@ jobs:
|
||||||
echo END_OF_FILE
|
echo END_OF_FILE
|
||||||
} >> "$GITHUB_ENV"
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: 📤 Publish crate on code.thetadev.de
|
- name: 📤 Publish crate
|
||||||
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
|
||||||
|
|
|
@ -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 = ".", version = "0.1.0", default-features = false }
|
rustypipe = { path = ".", default-features = false }
|
||||||
rustypipe-downloader = { path = "./downloader", version = "0.1.0", default-features = false }
|
rustypipe-downloader = { path = "./downloader", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["default-tls"]
|
default = ["default-tls"]
|
||||||
|
|
20
Justfile
20
Justfile
|
@ -51,6 +51,7 @@ 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/**"
|
||||||
|
@ -60,16 +61,19 @@ 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=$(cargo pkgid --package "$CRATE" | tr '#@' '\n' | tail -n 1)
|
VERSION=$(git-cliff $INCLUDES --bumped-version | grep -Po '\d+\.\d+\.\d+$')
|
||||||
TAG="${CRATE}/v${VERSION}"
|
echo "Releasing $VERSION:"
|
||||||
echo "Releasing $TAG:"
|
|
||||||
|
|
||||||
if git rev-parse "$TAG" >/dev/null 2>&1; then echo "version tag $TAG already exists"; exit 1; fi
|
if [ -n "$(git status --porcelain)" ]; then echo "Workdir must be clean"; 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
|
||||||
|
|
||||||
CLIFF_ARGS="--tag v${VERSION} --tag-pattern ${CRATE}/* --unreleased $INCLUDES"
|
cargo semver -c "$CARGO_TOML" set "$VERSION"
|
||||||
|
|
||||||
|
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"
|
||||||
|
@ -79,9 +83,7 @@ release crate="rustypipe":
|
||||||
|
|
||||||
editor "$CHANGELOG"
|
editor "$CHANGELOG"
|
||||||
|
|
||||||
git add "$CHANGELOG"
|
git add "$CHANGELOG" "$CARGO_TOML"
|
||||||
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 "$TAG"
|
awk 'BEGIN{RS="(^|\n)## [^\n]+\n*"} NR==2 { print }' "$CHANGELOG" | git tag -as -F - --cleanup whitespace "${CRATE}/v${VERSION}"
|
||||||
|
|
||||||
echo "🚀 Run 'git push origin $TAG' to publish"
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# 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).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue