From 73cb3d3dca4b08b414400d8c9d871428da8e145a Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 31 May 2024 22:40:07 +0200 Subject: [PATCH 01/13] Reworked release workflow. Added windows compile. --- .github/workflows/release.yaml | 85 +++++++++++++++++----------------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0227e2e..41d3559 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,59 +3,58 @@ name: Release on: push: tags: - - "*" + - v[0-9]+.* jobs: + body: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Extract release notes + uses: ffurrer2/extract-release-notes@v2 + id: release_notes + - name: Upload Body + uses: softprops/action-gh-release@v2 + with: + body: ${{ steps.release_notes.outputs.release_notes }} + build: strategy: matrix: - os: [ubuntu-latest, macos-latest] rust: [stable] + include: + - target: aarch64-unknown-linux-gnu + os: ubuntu-latest + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + - target: aarch64-apple-darwin + os: macos-latest + - target: x86_64-apple-darwin + os: macos-latest + - target: x86_64-pc-windows-msvc + os: windows-latest + - target: aarch64-pc-windows-msvc + os: windows-latest permissions: contents: write runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@master - - - name: Install just - uses: taiki-e/install-action@just - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: Setup build env for Linux - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt update - sudo apt install -y musl-tools gcc - rustup target add x86_64-unknown-linux-musl - - - name: Build for Linux - if: matrix.os == 'ubuntu-latest' - run: | - just build-release-linux - cp target/x86_64-unknown-linux-musl/release/tenere tenere-x86_64-linux-musl - - - name: Build for macos - if: matrix.os == 'macos-latest' - run: | - rustup target add aarch64-apple-darwin - just build-release-macos - cp target/x86_64-apple-darwin/release/tenere tenere-x86_64-macos - cp target/aarch64-apple-darwin/release/tenere tenere-aarch64-macos - - - name: Extract release notes - if: matrix.os == 'ubuntu-latest' - id: release_notes - uses: ffurrer2/extract-release-notes@v1 - - - name: Release - uses: softprops/action-gh-release@v1 + uses: actions/checkout@v4 + - name: Install Target + run: rustup target add ${{ matrix.target }} + - name: Compile + run: cargo build --release --target ${{ matrix.target }} --out-dir ./ + - name: Zip Binary (windows) + if: runner.os == 'Windows' + run: Compress-Archive -Path tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip + - name: Tar Binary (linux) + if: runner.os != 'Windows' + run: tar -cJf tenere-${{ matrix.target }}.tar.xz tenere + - name: Upload Binary + uses: softprops/action-gh-release@v2 with: - body: ${{ steps.release_notes.outputs.release_notes }} files: "tenere*" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ce7cc934654b13355c56a277dfb108d668c068a5 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 31 May 2024 22:54:29 +0200 Subject: [PATCH 02/13] Updated changelog to new version. Added path in readme. --- CHANGELOG.md | 56 ++++++++++++++++++++++++++++++++++++++++------------ README.md | 1 + 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ee341e..ba49a07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,31 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.11.1] 19/03/2024 + +## [unreleased] + +### Added + +* Windows executables to release. +* Windows config instructions. + + +### Changed + +* Reworked release github workflow. + + +## [0.11.1] - 2024-03-19 ### Changed - Update the license to GPLv3 - Update the notification layout -## [0.11] 02/02/2024 +## [0.11] - 2024-02-02 ### Added @@ -22,7 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Remove borders for chat block -## [0.10] 27/01/2024 +## [0.10] - 2024-01-27 ### Added @@ -34,7 +49,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Use model from the config file if defined -## [0.9] 01/11/2023 +## [0.9] - 2023-01-11 ### Features @@ -44,33 +59,33 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Scroll bars -## [0.8] 20/08/2023 +## [0.8] - 2023-08-20 ### Features - Stop the stream response with the key `t` - Add scrollbar for the chat block -## [0.7] 12/08/2023 +## [0.7] - 2023-08-12 ### Features - Support streamig responses for ChatGPT -## [0.6] 27/04/2023 +## [0.6] - 2023-04-27 ### Features - display a spinner in the waiting message - chatgpt url is configureable -## [0.5] 22/04/2023 +## [0.5] - 2023-04-22 ### Features - Save the current chat or chat history to a file with the key `s` -## [0.4] 21/04/2023 +## [0.4] - 2023-04-21 ### Features @@ -80,7 +95,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Change `ctrl+l` to `n` to start a new chat -## [0.3] 20/04/2023 +## [0.3] - 2023-04-20 ### Features @@ -94,7 +109,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Remove mode block -## [0.2] 17/04/2023 +## [0.2] - 2023-04-17 ### Features @@ -104,6 +119,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Fix the scrolling issue -## [0.1] 16/04/2023 +## [0.1] - 2023-04-16 First release 🎉 + + +[unreleased]: https://github.com/WyvernIXTL/ubilerntui/compare/v0.11.1...HEAD +[0.11.1]: https://github.com/pythops/tenere/compare/v0.11...v0.11.1 +[0.11]: https://github.com/pythops/tenere/compare/v0.10...v0.11 +[0.10]: https://github.com/pythops/tenere/compare/v0.9...v0.10 +[0.9]: https://github.com/pythops/tenere/compare/v0.8...v0.9 +[0.8]: https://github.com/pythops/tenere/compare/v0.7...v0.8 +[0.7]: https://github.com/pythops/tenere/compare/v0.6...v0.7 +[0.6]: https://github.com/pythops/tenere/compare/v0.5...v0.6 +[0.5]: https://github.com/pythops/tenere/compare/v0.4...v0.5 +[0.4]: https://github.com/pythops/tenere/compare/v0.3...v0.4 +[0.3]: https://github.com/pythops/tenere/compare/v0.2...v0.3 +[0.2]: https://github.com/pythops/tenere/compare/v0.1...v0.2 +[0.1]: https://github.com/pythops/tenere/releases/tag/v0.1 \ No newline at end of file diff --git a/README.md b/README.md index dc0f308..e4eb881 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ Tenere can be configured using a TOML configuration file. The file should be loc - Linux : `$HOME/.config/tenere/config.toml` or `$XDG_CONFIG_HOME/tenere/config.toml` - Mac : `$HOME/Library/Application Support/tenere/config.toml` +- Windows: `~/AppData/Roaming/tenere/config.toml` *(Please create.)* ### General settings From 6f88cf103370f264dcbe5ec1fbdab9543f196b07 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 31 May 2024 23:02:17 +0200 Subject: [PATCH 03/13] Fixed --out-dir --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 41d3559..7f7043b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -47,13 +47,13 @@ jobs: - name: Install Target run: rustup target add ${{ matrix.target }} - name: Compile - run: cargo build --release --target ${{ matrix.target }} --out-dir ./ + run: cargo build --release --target ${{ matrix.target }} - name: Zip Binary (windows) if: runner.os == 'Windows' - run: Compress-Archive -Path tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip + run: Compress-Archive -Path ./target/release/tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip - name: Tar Binary (linux) if: runner.os != 'Windows' - run: tar -cJf tenere-${{ matrix.target }}.tar.xz tenere + run: tar -cJf tenere-${{ matrix.target }}.tar.xz ./target/release/tenere - name: Upload Binary uses: softprops/action-gh-release@v2 with: From 8a0bca54ccf4393d3d29dba4edc7b617233419e9 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 31 May 2024 23:16:41 +0200 Subject: [PATCH 04/13] Fixed wrong path to exe in workflow build. --- .github/workflows/release.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7f7043b..162884b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,9 +21,10 @@ jobs: body: ${{ steps.release_notes.outputs.release_notes }} build: + permissions: + contents: write strategy: matrix: - rust: [stable] include: - target: aarch64-unknown-linux-gnu os: ubuntu-latest @@ -37,9 +38,6 @@ jobs: os: windows-latest - target: aarch64-pc-windows-msvc os: windows-latest - permissions: - contents: write - runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -50,10 +48,10 @@ jobs: run: cargo build --release --target ${{ matrix.target }} - name: Zip Binary (windows) if: runner.os == 'Windows' - run: Compress-Archive -Path ./target/release/tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip + run: Compress-Archive -Path ./target/${{ matrix.target }}/release/tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip - name: Tar Binary (linux) if: runner.os != 'Windows' - run: tar -cJf tenere-${{ matrix.target }}.tar.xz ./target/release/tenere + run: tar -cJf tenere-${{ matrix.target }}.tar.xz ./target/${{ matrix.target }}/release/tenere - name: Upload Binary uses: softprops/action-gh-release@v2 with: From 2f32f9c3fd6a1ce5478a432a300a731c954593f7 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 31 May 2024 23:31:55 +0200 Subject: [PATCH 05/13] Added fast fail false, as a few copmiles fail. --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 162884b..b73dd71 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,6 +24,7 @@ jobs: permissions: contents: write strategy: + fast-fail: false matrix: include: - target: aarch64-unknown-linux-gnu From 9b002cf927f286fbe53d6f7a0731dc06e164da7a Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 31 May 2024 23:34:42 +0200 Subject: [PATCH 06/13] Fixed to use continue-on-error. --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b73dd71..43f444f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,8 +23,8 @@ jobs: build: permissions: contents: write + continue-on-error: true strategy: - fast-fail: false matrix: include: - target: aarch64-unknown-linux-gnu From 789266bf4c2c37c432390f680d0b8a1386ced095 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 31 May 2024 23:40:26 +0200 Subject: [PATCH 07/13] Removed linux arm compile as it errors. --- .github/workflows/release.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 43f444f..19fc121 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,8 +27,6 @@ jobs: strategy: matrix: include: - - target: aarch64-unknown-linux-gnu - os: ubuntu-latest - target: x86_64-unknown-linux-gnu os: ubuntu-latest - target: aarch64-apple-darwin From 8056ce7e55c4b86f97d16ee91e3908303cea8b58 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Sat, 1 Jun 2024 01:35:08 +0200 Subject: [PATCH 08/13] Fixed wrong date in changelog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba49a07..47e2eb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use model from the config file if defined -## [0.9] - 2023-01-11 +## [0.9] - 2023-11-01 ### Features From b9c8ec244a96486b9e775f979234305781ac97da Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Sat, 1 Jun 2024 14:52:06 +0200 Subject: [PATCH 09/13] Removed unnecessary line about creating folder in readme. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4eb881..c1c28e7 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,8 @@ Tenere can be configured using a TOML configuration file. The file should be loc - Linux : `$HOME/.config/tenere/config.toml` or `$XDG_CONFIG_HOME/tenere/config.toml` - Mac : `$HOME/Library/Application Support/tenere/config.toml` -- Windows: `~/AppData/Roaming/tenere/config.toml` *(Please create.)* +- Windows: `~/AppData/Roaming/tenere/config.toml` + ### General settings From 581a514c456bb1f4b0f636b6df62e4f20162bc42 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Sat, 1 Jun 2024 15:01:03 +0200 Subject: [PATCH 10/13] Changed things to pythops likings. --- .github/workflows/release.yaml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 19fc121..a228e2d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,6 +29,8 @@ jobs: include: - target: x86_64-unknown-linux-gnu os: ubuntu-latest + - target: x86_64-unknown-linux-musl + os: ubuntu-latest - target: aarch64-apple-darwin os: macos-latest - target: x86_64-apple-darwin @@ -41,16 +43,27 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Add Musl + if: matrix.target == 'x86_64-unknown-linux-musl' + run: | + sudo apt update + sudo apt install -y musl-tools gcc + # - name: Install Target + # run: rustup target add ${{ matrix.target }} - name: Install Target - run: rustup target add ${{ matrix.target }} + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} - name: Compile run: cargo build --release --target ${{ matrix.target }} - - name: Zip Binary (windows) - if: runner.os == 'Windows' - run: Compress-Archive -Path ./target/${{ matrix.target }}/release/tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip - - name: Tar Binary (linux) - if: runner.os != 'Windows' - run: tar -cJf tenere-${{ matrix.target }}.tar.xz ./target/${{ matrix.target }}/release/tenere + # - name: Zip Binary (windows) + # if: runner.os == 'Windows' + # run: Compress-Archive -Path ./target/${{ matrix.target }}/release/tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip + # - name: Tar Binary (linux) + # if: runner.os != 'Windows' + # run: tar -cJf tenere-${{ matrix.target }}.tar.xz ./target/${{ matrix.target }}/release/tenere + - name: Rename Binary + run: mv ./target/${{ matrix.target }}/release/tenere ./tenere-${{ matrix.target }} - name: Upload Binary uses: softprops/action-gh-release@v2 with: From c0c6f0bed248d028d5d013f8ac9ab5767b0747d2 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Sat, 1 Jun 2024 15:09:28 +0200 Subject: [PATCH 11/13] Removed comments. Fixed windows mv. --- .github/workflows/release.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a228e2d..cd90a4e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -48,22 +48,18 @@ jobs: run: | sudo apt update sudo apt install -y musl-tools gcc - # - name: Install Target - # run: rustup target add ${{ matrix.target }} - name: Install Target uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - name: Compile run: cargo build --release --target ${{ matrix.target }} - # - name: Zip Binary (windows) - # if: runner.os == 'Windows' - # run: Compress-Archive -Path ./target/${{ matrix.target }}/release/tenere.exe -DestinationPath tenere-${{ matrix.target }}.zip - # - name: Tar Binary (linux) - # if: runner.os != 'Windows' - # run: tar -cJf tenere-${{ matrix.target }}.tar.xz ./target/${{ matrix.target }}/release/tenere - - name: Rename Binary + - name: Rename Binary (unix) + if: runner.os != 'Windows' run: mv ./target/${{ matrix.target }}/release/tenere ./tenere-${{ matrix.target }} + - name: Rename Binary (windows) + if: runner.os == 'Windows' + run: mv ./target/${{ matrix.target }}/release/tenere.exe ./tenere-${{ matrix.target }}.exe - name: Upload Binary uses: softprops/action-gh-release@v2 with: From 75a3a1fda763b02753b7ea6597de1efc7d9d27c3 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Sat, 1 Jun 2024 15:22:42 +0200 Subject: [PATCH 12/13] Readded stripping of binary. --- .github/workflows/release.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cd90a4e..7ad006d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ jobs: - name: Upload Body uses: softprops/action-gh-release@v2 with: - body: ${{ steps.release_notes.outputs.release_notes }} + body: ${{ steps.release_notes.outputs.release_notes }} build: permissions: @@ -54,6 +54,9 @@ jobs: targets: ${{ matrix.target }} - name: Compile run: cargo build --release --target ${{ matrix.target }} + - name: Strip Binary (linux) + if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.target == 'x86_64-unknown-linux-musl' + run: strip ./target/${{ matrix.target }}/release/tenere - name: Rename Binary (unix) if: runner.os != 'Windows' run: mv ./target/${{ matrix.target }}/release/tenere ./tenere-${{ matrix.target }} From c99d6d5a4c3e5fd3a886a123fb214fee0399586d Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Sat, 1 Jun 2024 16:58:23 +0200 Subject: [PATCH 13/13] continue-on-error: false --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7ad006d..1c3a054 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: build: permissions: contents: write - continue-on-error: true + continue-on-error: false strategy: matrix: include: