mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 12:39:47 +00:00
Read changelog from repo
This commit is contained in:
parent
672d973774
commit
9110a42b19
27
.github/workflows/build-and-release.yml
vendored
27
.github/workflows/build-and-release.yml
vendored
@ -340,7 +340,7 @@ jobs:
|
|||||||
build_linux_arm64:
|
build_linux_arm64:
|
||||||
name: Build app (linux-arm64)
|
name: Build app (linux-arm64)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: true # disable this job for now
|
if: false # disable this job for now
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -545,6 +545,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
formatted_version: ${{ steps.format_metadata.outputs.formatted_version }}
|
formatted_version: ${{ steps.format_metadata.outputs.formatted_version }}
|
||||||
formatted_build_time: ${{ steps.format_metadata.outputs.formatted_build_time }}
|
formatted_build_time: ${{ steps.format_metadata.outputs.formatted_build_time }}
|
||||||
|
changelog: ${{ steps.read_changelog.outputs.changelog }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -569,12 +570,24 @@ jobs:
|
|||||||
|
|
||||||
# Set the outputs:
|
# Set the outputs:
|
||||||
echo "formatted_version=${formatted_version}" >> "$GITHUB_OUTPUT"
|
echo "formatted_version=${formatted_version}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "FORMATTED_VERSION=${formatted_version}" >> $GITHUB_ENV
|
||||||
echo "formatted_build_time=${formatted_build_time}" >> "$GITHUB_OUTPUT"
|
echo "formatted_build_time=${formatted_build_time}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Read changelog
|
||||||
|
id: read_changelog
|
||||||
|
run: |
|
||||||
|
# Read the changelog file:
|
||||||
|
changelog=$(cat "app/MindWork AI Studio/wwwroot/changelog/${FORMATTED_VERSION}.md")
|
||||||
|
|
||||||
|
# Set the output:
|
||||||
|
echo "changelog<<EOOOF" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "${changelog}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "EOOOF" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
create_update_file:
|
create_update_file:
|
||||||
name: Create Tauri update file
|
name: Create Tauri update file
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build_main, read_metadata, build_linux_arm64] # TODO: build_linux_arm64
|
needs: [build_main, read_metadata] # TODO: build_linux_arm64
|
||||||
steps:
|
steps:
|
||||||
- name: Create artifact directory
|
- name: Create artifact directory
|
||||||
run: mkdir -p $GITHUB_WORKSPACE/artifacts
|
run: mkdir -p $GITHUB_WORKSPACE/artifacts
|
||||||
@ -646,6 +659,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
FORMATTED_VERSION: ${{ needs.read_metadata.outputs.formatted_version }}
|
FORMATTED_VERSION: ${{ needs.read_metadata.outputs.formatted_version }}
|
||||||
FORMATTED_BUILD_TIME: ${{ needs.read_metadata.outputs.formatted_build_time }}
|
FORMATTED_BUILD_TIME: ${{ needs.read_metadata.outputs.formatted_build_time }}
|
||||||
|
CHANGELOG: ${{ needs.read_metadata.outputs.changelog }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
# Remove the latest.json file if it exists:
|
# Remove the latest.json file if it exists:
|
||||||
@ -654,15 +668,18 @@ jobs:
|
|||||||
# Read the platforms JSON, which was created in the previous step:
|
# Read the platforms JSON, which was created in the previous step:
|
||||||
platforms=$(cat $GITHUB_WORKSPACE/.updates/platforms.json)
|
platforms=$(cat $GITHUB_WORKSPACE/.updates/platforms.json)
|
||||||
|
|
||||||
|
# Replace newlines in changelog with \n
|
||||||
|
changelog=$(echo "$CHANGELOG" | awk '{printf "%s\\n", $0}')
|
||||||
|
|
||||||
# Create the latest.json file:
|
# Create the latest.json file:
|
||||||
cat <<EOF > $GITHUB_WORKSPACE/.updates/latest.json
|
cat <<EOOOF > $GITHUB_WORKSPACE/.updates/latest.json
|
||||||
{
|
{
|
||||||
"version": "$FORMATTED_VERSION",
|
"version": "$FORMATTED_VERSION",
|
||||||
"notes": "Update to version $FORMATTED_VERSION.",
|
"notes": "$changelog",
|
||||||
"pub_date": "$FORMATTED_BUILD_TIME",
|
"pub_date": "$FORMATTED_BUILD_TIME",
|
||||||
"platforms": $platforms
|
"platforms": $platforms
|
||||||
}
|
}
|
||||||
EOF
|
EOOOF
|
||||||
|
|
||||||
- name: Display the content of latest.json
|
- name: Display the content of latest.json
|
||||||
run: cat $GITHUB_WORKSPACE/.updates/latest.json
|
run: cat $GITHUB_WORKSPACE/.updates/latest.json
|
@ -1,4 +1,4 @@
|
|||||||
0.5.2
|
0.5.0
|
||||||
2024-06-17 10:47:38 UTC
|
2024-06-17 10:47:38 UTC
|
||||||
153
|
153
|
||||||
8.0.206 (commit bb12410699)
|
8.0.206 (commit bb12410699)
|
||||||
|
Loading…
Reference in New Issue
Block a user