Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a987e438c4 | |||
| a150d34c6c |
@@ -0,0 +1,50 @@
|
||||
name: Release Tagging
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "v0.2" ]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Important for git describe --tags
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.88.0
|
||||
components: cargo
|
||||
|
||||
- name: Extract Version from Cargo.toml
|
||||
id: version
|
||||
run: |
|
||||
VERSION=$(grep '^version = "' Cargo.toml | sed -E 's/version = "([^"]+)"/\1/')
|
||||
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
|
||||
BRANCH_REF="${GITHUB_REF}"
|
||||
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
|
||||
PROJECT_TAG_RELEASE="v$VERSION-$BRANCH_NAME-$PROJECT_COMMIT_HASH"
|
||||
echo "::set-output name=project_tag_release::$PROJECT_TAG_RELEASE-961"
|
||||
echo "Version: $VERSION"
|
||||
echo "Hash: $PROJECT_COMMIT_HASH"
|
||||
echo "Branch: $BRANCH_NAME"
|
||||
echo "Tag Release: $PROJECT_TAG_RELEASE"
|
||||
|
||||
- name: Print version
|
||||
id: print_version
|
||||
run: |
|
||||
echo "Printing version"
|
||||
echo "Version: ${{ steps.version.outputs.project_tag_release }}"
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.version.outputs.project_tag_release }}
|
||||
release_name: Release ${{ steps.version.outputs.project_tag_release }}
|
||||
body: |
|
||||
Release of version ${{ steps.version.outputs.project_tag_release }}
|
||||
+33
-26
@@ -247,7 +247,7 @@ mod tests {
|
||||
) -> Result<axum::response::Response, std::convert::Infallible> {
|
||||
// Create multipart form
|
||||
let mut form = MultipartForm::default();
|
||||
let _ = form.add_file("flac", "tests/Machine_gun/track01.flac");
|
||||
let _ = form.add_file("flac", "tests/IAmWe/track01.flac");
|
||||
|
||||
// Create request
|
||||
let content_type = form.content_type();
|
||||
@@ -331,7 +331,7 @@ mod tests {
|
||||
app: &axum::Router,
|
||||
) -> Result<axum::response::Response, std::convert::Infallible> {
|
||||
let mut form = MultipartForm::default();
|
||||
let _ = form.add_file("jpg", "tests/Machine_gun/160809_machinegun.jpg");
|
||||
let _ = form.add_file("jpg", "tests/IAmWe/Coverart.jpg");
|
||||
|
||||
// Create request
|
||||
let content_type = form.content_type();
|
||||
@@ -407,22 +407,7 @@ mod tests {
|
||||
song_queue_id: &uuid::Uuid,
|
||||
user_id: &uuid::Uuid,
|
||||
) -> Result<axum::response::Response, std::convert::Infallible> {
|
||||
let payload = serde_json::json!({
|
||||
"title": "Power of Soul",
|
||||
"artist": "Jimmi Hendrix",
|
||||
"album_artist": "Jimmi Hendrix",
|
||||
"album": "Machine Gun",
|
||||
"genre": "Psychadelic Rock",
|
||||
"date": "2016-01-01",
|
||||
"track": 1,
|
||||
"disc": 1,
|
||||
"track_count": 11,
|
||||
"disc_count": 1,
|
||||
"duration": 330,
|
||||
"audio_type": "flac",
|
||||
"user_id": user_id,
|
||||
"song_queue_id": song_queue_id
|
||||
});
|
||||
let payload = payload_data::create_song(song_queue_id, user_id).await;
|
||||
|
||||
let req = axum::http::Request::builder()
|
||||
.method(axum::http::Method::POST)
|
||||
@@ -653,17 +638,39 @@ mod tests {
|
||||
serde_json::json!(
|
||||
{
|
||||
"song_queue_id": song_queue_id,
|
||||
"album" : "Machine Gun: The FillMore East First Show",
|
||||
"album_artist" : "Jimi Hendrix",
|
||||
"artist" : "Jimi Hendrix",
|
||||
"album" : "I",
|
||||
"album_artist" : "Kuoth",
|
||||
"artist" : "Kuoth",
|
||||
"disc" : 1,
|
||||
"disc_count" : 1,
|
||||
"duration" : 330,
|
||||
"genre" : "Psychadelic Rock",
|
||||
"title" : "Power of Soul",
|
||||
"duration" : 139,
|
||||
"genre" : "Alternative Hip-Hop",
|
||||
"title" : "Hypocrite Like The Rest",
|
||||
"track" : 1,
|
||||
"track_count" : 11,
|
||||
"year" : 2016
|
||||
"track_count" : 9,
|
||||
"year" : 2020
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn create_song(
|
||||
song_queue_id: &uuid::Uuid,
|
||||
user_id: &uuid::Uuid,
|
||||
) -> serde_json::Value {
|
||||
serde_json::json!({
|
||||
"title" : "Hypocrite Like The Rest",
|
||||
"artist" : "Kuoth",
|
||||
"album_artist": "Kuoth",
|
||||
"album": "I",
|
||||
"genre" : "Alternative Hip-Hop",
|
||||
"date": "2020-01-01",
|
||||
"track": 1,
|
||||
"disc": 1,
|
||||
"track_count": 9,
|
||||
"disc_count": 1,
|
||||
"duration": 139,
|
||||
"audio_type": "flac",
|
||||
"user_id": user_id,
|
||||
"song_queue_id": song_queue_id
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.7 MiB |
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"album": "I Am We",
|
||||
"album_artist": "Kuoth",
|
||||
"disc_count": 1,
|
||||
"genre": "Alternative Hip-Hop",
|
||||
"year": 2020,
|
||||
"track_count": 9,
|
||||
"tracks": [
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "Hypocrite Like the Rest",
|
||||
"duration": 139,
|
||||
"track": 1
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "It's Too Late",
|
||||
"duration": 116,
|
||||
"track": 2
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "Hell Might be Nice",
|
||||
"duration": 229,
|
||||
"track": 3
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "Dark Side of Progress",
|
||||
"duration": 187,
|
||||
"track": 4
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "Distractions",
|
||||
"duration": 141,
|
||||
"track": 5
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "But You Won't Listen",
|
||||
"duration": 184,
|
||||
"track": 6
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "Guidance",
|
||||
"duration": 121,
|
||||
"track": 7
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "M",
|
||||
"duration": 98,
|
||||
"track": 8
|
||||
},
|
||||
{
|
||||
"artist": "Kuoth",
|
||||
"disc": 1,
|
||||
"title": "Social Acceptance",
|
||||
"duration": 169,
|
||||
"track": 9
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 271 KiB |
Reference in New Issue
Block a user