build_mac #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build a shared library and an executable for macOS | |
name: build_mac | |
on: | |
workflow_dispatch: | |
env: | |
ZIP_NAME: TexconvCustomDLL | |
jobs: | |
build: | |
strategy: | |
matrix: | |
use_libs: [false, true] | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
git submodule update --init --recursive | |
bash shell_scripts/get_sal.sh | |
- name: build texconv | |
if: matrix.use_libs == false | |
run: | | |
bash shell_scripts/build.sh | |
bash shell_scripts/build_as_exe.sh | |
- name: build texconv with libjpeg and libpng | |
if: matrix.use_libs == true | |
run: | | |
bash shell_scripts/build_with_jpg_png.sh | |
bash shell_scripts/build_as_exe_with_jpg_png.sh | |
- name: Copy files | |
run: | | |
mkdir -p release/${{ env.ZIP_NAME }} | |
cp libtexconv.dylib release/${{ env.ZIP_NAME }} | |
cp texconv release/${{ env.ZIP_NAME }} | |
cp texassemble release/${{ env.ZIP_NAME }} | |
cp changelog.txt release/${{ env.ZIP_NAME }} | |
cp LICENSE release/${{ env.ZIP_NAME }} | |
cd release | |
tar -jcvf ${{ env.ZIP_NAME }}-${{ runner.os }}${{ ((matrix.use_libs == false) && '-no-deps') || '' }}.tar.bz2 ${{ env.ZIP_NAME }} | |
- name: Create Release Draft | |
id: create-release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
name: ${{ github.ref }} | |
body: | | |
Changelog | |
- First Change | |
- Second Change | |
draft: true | |
prerelease: false | |
- name: Upload Release Asset | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ github.ref }} release/${{ env.ZIP_NAME }}-${{ runner.os }}${{ ((matrix.use_libs == false) && '-no-deps') || '' }}.tar.bz2 |