Skip to content

v0.2.38

v0.2.38 #24

Workflow file for this run

name: release_binaries
on:
release:
types: created
jobs:
macOS:
name: Add macOS binaries to release
runs-on: macos-12
env:
XCODE_VERSION: ${{ '14.1' }}
steps:
- name: Select Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app"
- name: Checkout
uses: actions/checkout@v1
- name: Set tag name
run: echo "TAG_NAME=$(echo $GITHUB_REF | cut -c 11-)" >> $GITHUB_ENV
- name: Build x86_64-apple-macosx
run: rake 'build[release, x86_64-apple-macosx]'
- name: Zip x86_64-apple-macosx release
run: "mkdir releases && zip -j releases/XCLogParser-macOS-x86_64-$TAG_NAME.zip .build/release/xclogparser"
- name: Save x86_64 executable to be lipo'd later
run: mkdir tmp && cp .build/release/xclogparser tmp/xclogparser-x86_64
- name: Zip x86_64-apple-macosx release
run: "zip -j releases/XCLogParser-macOS-x86_64-$TAG_NAME.zip .build/release/xclogparser"
- name: Build arm64-apple-macosx
run: rake 'build[release, arm64-apple-macosx]'
- name: Zip arm64-apple-macosx release
run: "zip -j releases/XCLogParser-macOS-arm64-$TAG_NAME.zip .build/release/xclogparser"
- name: Lipo macOS executables
run: "lipo -create -output tmp/xclogparser tmp/xclogparser-x86_64 .build/release/xclogparser"
- name: Zip x86_64-arm64-apple-macosx release
run: "zip -j releases/XCLogParser-macOS-x86-64-arm64-$TAG_NAME.zip tmp/xclogparser"
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: releases/*
file_glob: true
tag: ${{ github.ref }}
overwrite: true
linux:
name: Add Linux binaries to release
runs-on: ubuntu-latest
container:
image: swift:5.7.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Ruby
run: apt-get update && apt-get install -y ruby zlib1g-dev
- name: Build
run: LANG=en_US.UTF-8 LC_CTYPE=UTF-8 rake build[release]
- name: Set tag name
run: echo "TAG_NAME=$(echo $GITHUB_REF | cut -c 11-)" >> $GITHUB_ENV
- name: Zip release
uses: montudor/[email protected]
with:
args: zip -j XCLogParser-linux-amd64.zip .build/release/xclogparser
- name: Rename zip
run: "mkdir releases && mv XCLogParser-linux-amd64.zip releases/XCLogParser-linux-amd64-$TAG_NAME.zip"
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: releases/*
file_glob: true
tag: ${{ github.ref }}
overwrite: true