Fetch Binaries #3
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
name: Fetch Binaries | |
defaults: | |
run: | |
shell: bash | |
on: | |
workflow_dispatch | |
jobs: | |
create_release: | |
name: Create Release | |
if: contains('["raub"]', github.actor) | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Fetch Repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.9.0 | |
cache: 'npm' | |
- name: Get Package Version | |
id: package-version | |
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT | |
- name: Create Draft Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
tag_name: ${{ steps.package-version.outputs.version }} | |
name: Release ${{ steps.package-version.outputs.version }} | |
build: | |
name: Fetch Qt Binaries | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, windows-2022, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Fetch Repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: '6.8.0' | |
cache: 'true' | |
cache-key-prefix: 'install-qt-${{ matrix.os }}' | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.9.0 | |
cache: 'npm' | |
- name: Get Package Version | |
id: package-version | |
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT | |
- name: Locate Tmp Dir | |
run: | | |
QT_TMP0='${{ github.workspace }}' | |
QT_TMP1="${QT_TMP0//'\'/"/"}" | |
echo "QT_TMP=$QT_TMP1/../__tmp" >> $GITHUB_ENV | |
- name: Create Qt Subdirs | |
run: | | |
chmod +x src/qt-mkdir.sh | |
src/qt-mkdir.sh ${{ env.QT_TMP }} | |
- name: Copy Qt Dir - Linux | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
echo "OS_NAME=linux" >> $GITHUB_ENV | |
chmod +x src/qt-copy-linux.sh | |
src/qt-copy-linux.sh ${{ env.QT_TMP }} ${{ github.workspace }}/../Qt/6.8.0/gcc_64 | |
- name: Copy Qt Dir - MacOS ARM | |
if: matrix.os == 'macos-14' | |
run: | | |
echo "OS_NAME=darwin-arm64" >> $GITHUB_ENV | |
chmod +x src/qt-copy-macos.sh | |
src/qt-copy-macos.sh ${{ env.QT_TMP }} ${{ github.workspace }}/../Qt/6.8.0/macos | |
- name: Copy Qt Dir - Windows | |
if: matrix.os == 'windows-2022' | |
run: | | |
echo "OS_NAME=windows" >> $GITHUB_ENV | |
src/qt-copy-windows.sh '${{ env.QT_TMP }}' '${{ github.workspace }}\..\Qt\6.8.0\msvc2022_64' | |
- name: Pack Libs | |
run: | | |
cd '${{ env.QT_TMP }}' | |
tar -czf ../${{ env.OS_NAME }}.gz * | |
- name: Store Binaries | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
tag_name: ${{ steps.package-version.outputs.version }} | |
name: Release ${{ steps.package-version.outputs.version }} | |
files: ${{ env.QT_TMP }}/../${{ env.OS_NAME }}.gz |