From 0834ca8cf3813545847685cb40fcbe124188db06 Mon Sep 17 00:00:00 2001 From: Haydon Ryan Date: Tue, 3 Dec 2024 14:38:02 -0600 Subject: [PATCH] Adding MacOS(apple silicon and x86) github actions --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0d4293..6dc77a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,3 +63,32 @@ jobs: run: | cargo deb gh release upload "$VERSION" ./target/debian/ebook2audiobook_${{ env.PKG_VERSION }}-1_amd64.deb + + Build_MacOS: + name: Build_MacOS + needs: ['Create-Release'] + runs-on: macos-latest + env: + VERSION: ${{needs.Create-Release.outputs.version}} + PKG_VERSION: ${{needs.Create-Release.outputs.pkg_version}} + steps: + - uses: actions/checkout@v4 + - name: Build MacOS Apple Silicon + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + cargo build --release --target aarch64-apple-darwin + mv ./target/aarch64-apple-darwin/release/ebook2audiobook ./target/aarch64-apple-darwin/release/ebook2audiobook_${{ env.PKG_VERSION }}_macosarm + gh release upload "$VERSION" ./target/aarch64-apple-darwin/release/ebook2audiobook_${{ env.PKG_VERSION }}_macosarm + - name: Install MacOS x86 toolchain + run: rustup target add x86_64-apple-darwin + - name: Build MacOS x86 + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + cargo build --release --target x86_64-apple-darwin + mv ./target/aarch64-apple-darwin/release/ebook2audiobook ./target/x86_64-apple-darwin/release/ebook2audiobook_${{ env.PKG_VERSION }}_macosx86 + gh release upload "$VERSION" ./target/x86_64-apple-darwin/release/ebook2audiobook_${{ env.PKG_VERSION }}_macosx86 + ls -la ./target/x86_64-apple-darwin/release/ diff --git a/Cargo.toml b/Cargo.toml index fafc7ac..a4cdecd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ebook2audiobook" -version = "0.1.0" +version = "0.1.1" edition = "2021" license = "MIT" repository = "https://github.com/haydonryan/epub2audiobook"