diff --git a/.github/workflows/jan-electron-build-nightly.yml b/.github/workflows/jan-electron-build-nightly.yml index d0c2adb0c..b57f4eea1 100644 --- a/.github/workflows/jan-electron-build-nightly.yml +++ b/.github/workflows/jan-electron-build-nightly.yml @@ -68,13 +68,13 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 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 - name: Upload Artifact uses: actions/upload-artifact@v2 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 build-windows-x64: @@ -124,7 +124,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 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 build-linux-x64: @@ -170,11 +170,12 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v2 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 noti-discord-nightly: needs: [build-macos, build-windows-x64, build-linux-x64] + environment: production if: github.event_name == 'schedule' runs-on: ubuntu-latest steps: @@ -185,8 +186,20 @@ jobs: env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + - name: Update README.md with artifact URL + run: | + sed -i "s|||" 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: needs: [build-macos, build-windows-x64, build-linux-x64] + environment: production if: github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: @@ -196,3 +209,16 @@ jobs: args: "Manual build artifact: https://github.com/janhq/jan/actions/runs/{{ GITHUB_RUN_ID }}" env: 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|||" 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 }} \ No newline at end of file diff --git a/.github/workflows/jan-electron-linter-and-test.yml b/.github/workflows/jan-electron-linter-and-test.yml index 7717afbd4..dd3656101 100644 --- a/.github/workflows/jan-electron-linter-and-test.yml +++ b/.github/workflows/jan-electron-linter-and-test.yml @@ -11,6 +11,9 @@ on: - "package.json" - "node_modules/**" - "yarn.lock" + - "core/**" + - "extensions/**" + - "!README.md" pull_request: branches: @@ -43,6 +46,11 @@ jobs: with: node-version: 20 + - name: "Cleanup cache" + continue-on-error: true + run: | + make clean + - name: Linter and test run: | make test @@ -69,6 +77,13 @@ jobs: with: node-version: 20 + # Clean cache, continue on error + - name: "Cleanup cache" + shell: powershell + continue-on-error: true + run: | + make clean + - name: Linter and test shell: powershell run: | @@ -92,6 +107,11 @@ jobs: with: node-version: 20 + - name: "Cleanup cache" + continue-on-error: true + run: | + make clean + - name: Linter and test run: | export DISPLAY=$(w -h | awk 'NR==1 {print $2}') diff --git a/.github/workflows/update-release-url.yml b/.github/workflows/update-release-url.yml new file mode 100644 index 000000000..a18cf8f54 --- /dev/null +++ b/.github/workflows/update-release-url.yml @@ -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|||" README.md + sed -i "s|||" README.md + sed -i "s|||" README.md + sed -i "s|||" 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 diff --git a/README.md b/README.md index 3331d70d9..0e9171556 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,53 @@ Jan is an open-source ChatGPT alternative that runs 100% offline on your compute - [x] Linux Debian - [x] Windows x64 -> Download Jan at https://jan.ai/ +## Download + +
| Version Type | +Windows | +MacOS | +Linux | +|
| Stable (Recommended) | +
+
+
+ jan.exe
+
+ |
+
+
+
+ Intel
+
+ |
+
+
+
+ M1/M2
+
+ |
+
+
+
+ jan.deb
+
+ |
+
| Experimental (Nighlty Build) | ++ + Github action artifactory + + | +|||