CI automatically update Update README with Nightly Build Information and stable download URL (#940)
* Add table download to README * CI update Nightly Build URL on github README.md file * Add CI to update latest release url to README.md * Add clean cache to test pipeline * set style=text-align:center in download table * Manual build update experimental URL if triggered from main branch --------- Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
parent
730dcfcf46
commit
074b18da74
34
.github/workflows/jan-electron-build-nightly.yml
vendored
34
.github/workflows/jan-electron-build-nightly.yml
vendored
@ -68,13 +68,13 @@ jobs:
|
|||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: jan-mac-x64-${{ steps.version_update.outputs.new_version }}.dmg
|
name: jan-mac-x64-${{ steps.version_update.outputs.new_version }}
|
||||||
path: ./electron/dist/jan-mac-x64-${{ steps.version_update.outputs.new_version }}.dmg
|
path: ./electron/dist/jan-mac-x64-${{ steps.version_update.outputs.new_version }}.dmg
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: jan-mac-arm64-${{ steps.version_update.outputs.new_version }}.dmg
|
name: jan-mac-arm64-${{ steps.version_update.outputs.new_version }}
|
||||||
path: ./electron/dist/jan-mac-arm64-${{ steps.version_update.outputs.new_version }}.dmg
|
path: ./electron/dist/jan-mac-arm64-${{ steps.version_update.outputs.new_version }}.dmg
|
||||||
|
|
||||||
build-windows-x64:
|
build-windows-x64:
|
||||||
@ -124,7 +124,7 @@ jobs:
|
|||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: jan-win-x64-${{ steps.version_update.outputs.new_version }}.exe
|
name: jan-win-x64-${{ steps.version_update.outputs.new_version }}
|
||||||
path: ./electron/dist/*.exe
|
path: ./electron/dist/*.exe
|
||||||
|
|
||||||
build-linux-x64:
|
build-linux-x64:
|
||||||
@ -170,11 +170,12 @@ jobs:
|
|||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: jan-linux-amd64-${{ steps.version_update.outputs.new_version }}.deb
|
name: jan-linux-amd64-${{ steps.version_update.outputs.new_version }}
|
||||||
path: ./electron/dist/*.deb
|
path: ./electron/dist/*.deb
|
||||||
|
|
||||||
noti-discord-nightly:
|
noti-discord-nightly:
|
||||||
needs: [build-macos, build-windows-x64, build-linux-x64]
|
needs: [build-macos, build-windows-x64, build-linux-x64]
|
||||||
|
environment: production
|
||||||
if: github.event_name == 'schedule'
|
if: github.event_name == 'schedule'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -185,8 +186,20 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
|
- name: Update README.md with artifact URL
|
||||||
|
run: |
|
||||||
|
sed -i "s|<a href='https://github.com/janhq/jan/actions/runs/.*'>|<a href='https://github.com/janhq/jan/actions/runs/${GITHUB_RUN_ID}'>|" README.md
|
||||||
|
git config --global user.email "service@jan.ai"
|
||||||
|
git config --global user.name "Service Account"
|
||||||
|
git add README.md
|
||||||
|
git commit -m "${GITHUB_REPOSITORY}: Update README.md with nightly build artifact URL"
|
||||||
|
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin HEAD:main
|
||||||
|
env:
|
||||||
|
GITHUB_RUN_ID: ${{ github.run_id }}
|
||||||
|
|
||||||
noti-discord-manual:
|
noti-discord-manual:
|
||||||
needs: [build-macos, build-windows-x64, build-linux-x64]
|
needs: [build-macos, build-windows-x64, build-linux-x64]
|
||||||
|
environment: production
|
||||||
if: github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'workflow_dispatch'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -196,3 +209,16 @@ jobs:
|
|||||||
args: "Manual build artifact: https://github.com/janhq/jan/actions/runs/{{ GITHUB_RUN_ID }}"
|
args: "Manual build artifact: https://github.com/janhq/jan/actions/runs/{{ GITHUB_RUN_ID }}"
|
||||||
env:
|
env:
|
||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
|
# Update README.md with artifact URL if manual build from main branch
|
||||||
|
- name: Update README.md with artifact URL
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
run: |
|
||||||
|
sed -i "s|<a href='https://github.com/janhq/jan/actions/runs/.*'>|<a href='https://github.com/janhq/jan/actions/runs/${GITHUB_RUN_ID}'>|" README.md
|
||||||
|
git config --global user.email "service@jan.ai"
|
||||||
|
git config --global user.name "Service Account"
|
||||||
|
git add README.md
|
||||||
|
git commit -m "${GITHUB_REPOSITORY}: Update README.md with nightly build artifact URL"
|
||||||
|
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin HEAD:main
|
||||||
|
env:
|
||||||
|
GITHUB_RUN_ID: ${{ github.run_id }}
|
||||||
@ -11,6 +11,9 @@ on:
|
|||||||
- "package.json"
|
- "package.json"
|
||||||
- "node_modules/**"
|
- "node_modules/**"
|
||||||
- "yarn.lock"
|
- "yarn.lock"
|
||||||
|
- "core/**"
|
||||||
|
- "extensions/**"
|
||||||
|
- "!README.md"
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
@ -43,6 +46,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
|
- name: "Cleanup cache"
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
make clean
|
||||||
|
|
||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
@ -69,6 +77,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
|
# Clean cache, continue on error
|
||||||
|
- name: "Cleanup cache"
|
||||||
|
shell: powershell
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
make clean
|
||||||
|
|
||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
@ -92,6 +107,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
|
- name: "Cleanup cache"
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
make clean
|
||||||
|
|
||||||
- name: Linter and test
|
- name: Linter and test
|
||||||
run: |
|
run: |
|
||||||
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
|
||||||
|
|||||||
37
.github/workflows/update-release-url.yml
vendored
Normal file
37
.github/workflows/update-release-url.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Update Download URLs
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-readme:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: production
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get Latest Release
|
||||||
|
uses: pozetroninc/github-action-get-latest-release@v0.7.0
|
||||||
|
id: get-latest-release
|
||||||
|
|
||||||
|
- name: Update Download URLs in README.md
|
||||||
|
run: |
|
||||||
|
echo "Latest Release: ${{ steps.get-latest-release.outputs.release }}"
|
||||||
|
release=$(/bin/echo -n "${{ steps.get-latest-release.outputs.release }}")
|
||||||
|
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-win-x64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-win-x64-${release}.exe'>|" README.md
|
||||||
|
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-mac-x64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-mac-x64-${release}.dmg'>|" README.md
|
||||||
|
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-mac-arm64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-mac-arm64-${release}.dmg'>|" README.md
|
||||||
|
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-linux-amd64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-linux-amd64-${release}.deb'>|" README.md
|
||||||
|
|
||||||
|
- name: Commit and Push changes
|
||||||
|
run: |
|
||||||
|
git config --global user.email "service@jan.ai"
|
||||||
|
git config --global user.name "Service Account"
|
||||||
|
git add README.md
|
||||||
|
git commit -m "Update README.md with Stable Download URLs"
|
||||||
|
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin HEAD:main
|
||||||
48
README.md
48
README.md
@ -31,7 +31,53 @@ Jan is an open-source ChatGPT alternative that runs 100% offline on your compute
|
|||||||
- [x] Linux Debian
|
- [x] Linux Debian
|
||||||
- [x] Windows x64
|
- [x] Windows x64
|
||||||
|
|
||||||
> Download Jan at https://jan.ai/
|
## Download
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:center"><b>Version Type</b></td>
|
||||||
|
<td style="text-align:center"><b>Windows</b></td>
|
||||||
|
<td colspan="2" style="text-align:center"><b>MacOS</b></td>
|
||||||
|
<td style="text-align:center"><b>Linux</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr style="text-align: center">
|
||||||
|
<td style="text-align:center"><b>Stable (Recommended)</b></td>
|
||||||
|
<td style="text-align:center">
|
||||||
|
<a href='https://github.com/janhq/jan/releases/download/v0.4.0/jan-win-x64-0.4.0.exe'>
|
||||||
|
<img src='./docs/static/img/windows.png' style="height:14px; width: 14px" />
|
||||||
|
<b>jan.exe</b>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:center">
|
||||||
|
<a href='https://github.com/janhq/jan/releases/download/v0.4.0/jan-mac-x64-0.4.0.dmg'>
|
||||||
|
<img src='./docs/static/img/mac.png' style="height:15px; width: 15px" />
|
||||||
|
<b>Intel</b>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:center">
|
||||||
|
<a href='https://github.com/janhq/jan/releases/download/v0.4.0/jan-mac-arm64-0.4.0.dmg'>
|
||||||
|
<img src='./docs/static/img/mac.png' style="height:15px; width: 15px" />
|
||||||
|
<b>M1/M2</b>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:center">
|
||||||
|
<a href='https://github.com/janhq/jan/releases/download/v0.4.0/jan-linux-amd64-0.4.0.deb'>
|
||||||
|
<img src='./docs/static/img/linux.png' style="height:14px; width: 14px" />
|
||||||
|
<b>jan.deb</b>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="text-align: center">
|
||||||
|
<td style="text-align:center"><b>Experimental (Nighlty Build)</b></td>
|
||||||
|
<td style="text-align:center" colspan="4">
|
||||||
|
<a href='https://github.com/janhq/jan/actions/runs/7160001076'>
|
||||||
|
<b>Github action artifactory</b>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
Download the latest version of Jan at https://jan.ai/ or visit the **[GitHub Releases](https://github.com/janhq/jan/releases)** to download any previous release.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
|
|||||||
BIN
docs/static/img/linux.png
vendored
Normal file
BIN
docs/static/img/linux.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
BIN
docs/static/img/mac.png
vendored
Normal file
BIN
docs/static/img/mac.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
BIN
docs/static/img/windows.png
vendored
Normal file
BIN
docs/static/img/windows.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
Loading…
x
Reference in New Issue
Block a user