Skip to content

Commit

Permalink
Adding MacOS(apple silicon and x86) github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
haydonryan committed Dec 3, 2024
1 parent 493814e commit 0834ca8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 0834ca8

Please sign in to comment.