Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
aoidenpa committed Aug 21, 2024
1 parent 72d1a4e commit 876238d
Showing 1 changed file with 0 additions and 92 deletions.
92 changes: 0 additions & 92 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,98 +161,6 @@ jobs:
tag: ${{ github.ref }}
overwrite: true

# Build for MacOS x86_64
release-macOS-intel:
runs-on: macOS-latest

steps:
- uses: olegtarasov/[email protected]
id: get_version
- uses: actions/checkout@v4
with:
lfs: ${{ env.use_git_lfs }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin
- name: Environment Setup
run: |
export CFLAGS="-fno-stack-check"
export MACOSX_DEPLOYMENT_TARGET="10.9"
- name: Build
run: |
cargo build --release --target x86_64-apple-darwin
- name: Prepare Package
run: |
mkdir -p ${{ env.binary }}.app/Contents/MacOS
cp target/x86_64-apple-darwin/release/${{ env.binary }} ${{ env.binary }}.app/Contents/MacOS/
cp -r assets ${{ env.binary }}.app/Contents/MacOS/ || true # Try to copy, but ignore if it can't copy if source directory does not exist
hdiutil create -fs HFS+ -volname "${{ env.binary }}" -srcfolder ${{ env.binary }}.app ${{ env.binary }}-macOS-intel.dmg
- name: Upload binaries to artifacts
uses: actions/upload-artifact@v3
with:
path: ${{ env.binary }}-macOS-intel.dmg
name: macOS-intel
retention-days: 1

- name: Upload binaries to release
if: ${{ env.add_binaries_to_github_release == 'true' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.binary }}-macOS-intel.dmg
asset_name: ${{ env.binary }}-macOS-intel-${{ steps.get_version.outputs.tag }}.dmg
tag: ${{ github.ref }}
overwrite: true

# Build for MacOS Apple Silicon
release-macOS-apple-silicon:
runs-on: macOS-latest

steps:
- uses: olegtarasov/[email protected]
id: get_version
- uses: actions/checkout@v4
with:
lfs: ${{ env.use_git_lfs }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- name: Environment
# macOS 11 was the first version to support ARM
run: |
export MACOSX_DEPLOYMENT_TARGET="11"
- name: Build
run: |
cargo build --release --target aarch64-apple-darwin
- name: Prepare Package
run: |
mkdir -p ${{ env.binary }}.app/Contents/MacOS
cp target/aarch64-apple-darwin/release/${{ env.binary }} ${{ env.binary }}.app/Contents/MacOS/
cp -r assets ${{ env.binary }}.app/Contents/MacOS/ || true # Try to copy, but ignore if it can't copy if source directory does not exist
hdiutil create -fs HFS+ -volname "${{ env.binary }}-macOS-apple-silicon" -srcfolder ${{ env.binary }}.app ${{ env.binary }}-macOS-apple-silicon.dmg
- name: Upload binaries to artifacts
uses: actions/upload-artifact@v3
with:
path: ${{ env.binary }}-macOS-apple-silicon.dmg
name: macOS-apple-silicon
retention-days: 1

- name: Upload binaries to release
if: ${{ env.add_binaries_to_github_release == 'true' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.binary }}-macOS-apple-silicon.dmg
asset_name: ${{ env.binary }}-macOS-apple-silicon-${{ steps.get_version.outputs.tag }}.dmg
tag: ${{ github.ref }}
overwrite: true

check-if-upload-to-itch-is-configured:
runs-on: ubuntu-latest
outputs:
Expand Down

0 comments on commit 876238d

Please sign in to comment.