Skip to content

Updated release action version. #66

Updated release action version.

Updated release action version. #66

Workflow file for this run

name: Release
on: [push]
permissions:
contents: write
env:
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-ubuntu.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package
working-directory: ${{github.workspace}}/build
run: cpack
- uses: actions/upload-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-linux
path: ${{github.workspace}}/build/GoOdf*.tar.gz
build-appimage:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-ubuntu-appimage.sh
- name: Read version file
shell: bash
working-directory: ${{github.workspace}}
id: read_version
run: |
VERSION_TXT=$(< version.txt)
echo "app_version=${VERSION_TXT}" >> $GITHUB_ENV
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Install
working-directory: ${{github.workspace}}/build
run: make install DESTDIR=AppDir
- name: Create Appimage
working-directory: ${{github.workspace}}/build
run: |
echo "DEPLOY_GTK_VERSION=3" >> $GITHUB_ENV
echo "APPIMAGE_EXTRACT_AND_RUN=1" >> $GITHUB_ENV
linuxdeploy-x86_64.AppImage --appdir AppDir -e ./bin/GoOdf -d ./share/GoOdf/applications/GoOdf.desktop -i ./share/icons/hicolor/256x256/apps/GoOdf.png --plugin gtk
appimagetool-x86_64.AppImage --no-appstream AppDir GoOdf-${{env.app_version}}.x86_64.AppImage
- uses: actions/upload-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-AppImage
path: ${{github.workspace}}/build/GoOdf*.AppImage
build-cross-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-ubuntu-cross.sh
- name: Get cross-compiled wxWidgets
run: |
wget https://github.com/larspalo/WxWidgetsCross/releases/download/3.2.3-2.go/wxwidgets3-mingw-w64-static_3.2.3-2.go_all.deb
sudo apt-get install -y ./wxwidgets3-mingw-w64-static_3.2.3-2.go_all.deb
- name: Configure CMake
run: cmake -B ${{github.workspace}}/crossbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchain.def
- name: Build
run: cmake --build ${{github.workspace}}/crossbuild --config ${{env.BUILD_TYPE}}
- name: Package
working-directory: ${{github.workspace}}/crossbuild
run: cpack
- uses: actions/upload-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-windows
path: ${{github.workspace}}/crossbuild/GoOdf*.zip
build-macos-x86:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-osx.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build with CMake
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package with CPack
working-directory: ${{github.workspace}}/build
run: cpack
- uses: actions/upload-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-macos-x86
path: ${{ github.workspace }}/build/GoOdf*.dmg
build-macos-arm:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Get dependencies
run: ${{github.workspace}}/scripts/prepare-osx.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build with CMake
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package with CPack
working-directory: ${{github.workspace}}/build
run: cpack
- uses: actions/upload-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-macos-arm
path: ${{ github.workspace }}/build/GoOdf*.dmg
release:
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
needs: [ build-linux, build-appimage, build-cross-windows, build-macos-x86, build-macos-arm ]
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-linux
- uses: actions/download-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-AppImage
- uses: actions/download-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-windows
- uses: actions/download-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-macos-x86
- uses: actions/download-artifact@v4
with:
name: GoOdf-${{github.ref_name}}-macos-arm
- name: Remove Starting v From Tag
id: remove_v
run: |
TAG=${{github.ref_name}}
echo "release_version=${TAG#v}" >> $GITHUB_ENV
- name: Populate Release
uses: softprops/action-gh-release@v2
with:
draft: false
prerelease: false
body: Release files created from GitHub action runners.
files: |
GoOdf-${{env.release_version}}-linux.x86_64.tar.gz
GoOdf-${{env.release_version}}.x86_64.AppImage
GoOdf-${{env.release_version}}-windows.x86_64.zip
GoOdf-${{env.release_version}}-macOS.x86_64.dmg
GoOdf-${{env.release_version}}-macOS.arm64.dmg