Skip to content

build_all

build_all #17

Workflow file for this run

# Run building workflows for all supported platforms
name: build_all
on:
push:
tags:
- "v*"
workflow_dispatch:
env:
ZIP_NAME: TexconvCustomDLL
CACHE_NAME: main
jobs:
setup:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.check-tag.outputs.tag }}
steps:
- name: Check tag
id: check-tag
run: |
if [[ ${{ github.ref }} == refs/tags/v* ]]; then
TAG=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
else
TAG=$(echo ${{ github.sha }} | cut -c1-7)
fi
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
shell: bash
- name: Create Release Draft
id: create-release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.check-tag.outputs.tag }}
name: ${{ steps.check-tag.outputs.tag }}
body: |
Changelog
- First Change
- Second Change
draft: true
prerelease: false
build_windows:
runs-on: windows-2022
needs: setup
steps:
- uses: actions/checkout@v4
- run: git submodule update --init --recursive DirectXTex
- name: build exe
run: |
batch_files/build.bat
batch_files/build_as_exe.bat
- name: Copy files
run: |
mkdir -p release
cp texconv.dll release/
cp texconv.exe release/
cp texassemble.exe release/
cp changelog.txt release/
cp LICENSE release/
shell: bash
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
directory: 'release'
type: 'zip'
filename: '${{ env.ZIP_NAME }}-${{ needs.setup.outputs.tag }}-${{ runner.os }}.zip'
exclusions: '*.git* .gitignore'
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.setup.outputs.tag }} release/${{ env.ZIP_NAME }}-${{ needs.setup.outputs.tag }}-${{ runner.os }}.zip
build_unix:
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
use_libs: [false, true]
runs-on: ${{ matrix.os }}
needs: setup
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.* 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 }}-${{ needs.setup.outputs.tag }}-${{ runner.os }}${{ ((matrix.use_libs == false) && '-no-deps') || '' }}.tar.bz2 ${{ env.ZIP_NAME }}
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.setup.outputs.tag }} release/${{ env.ZIP_NAME }}-${{ needs.setup.outputs.tag }}-${{ runner.os }}${{ ((matrix.use_libs == false) && '-no-deps') || '' }}.tar.bz2