Skip to content

Add release token

Add release token #69

Workflow file for this run

name: Ubuntu
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
qt:
- version: 6.5.3
modules: qtwebengine qtwebchannel qtpositioning
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt.version }}
modules: ${{ matrix.qt.modules }}
- name: ubuntu install GL library
run: sudo apt-get install -y libglew-dev libglfw3-dev
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Build Ubuntu
env:
QT_VERSION: ${{ matrix.qt.version }}
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}/lib/cmake
CMAKE_BUILD_TYPE: Release
run: |
# ls -al ${{ github.workspace }}/..
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}/gcc_64
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}/gcc_64/lib
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}/gcc_64/lib/cmake
# ls -al
mkdir build
cd build
cmake ..
make
cd ..
ls -al build
- name: Package Application
env:
QT_VERSION: ${{ matrix.qt.version }}
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}/lib/cmake
CMAKE_BUILD_TYPE: Release
run: |
cd build
os=$(echo "${{ matrix.os }}" | sed 's/-latest//')
repository_name=$(basename ${{ github.repository }})
zipfile=${repository_name}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
mkdir ${{ env.CMAKE_BUILD_TYPE }}
mv ${repository_name} ${{ env.CMAKE_BUILD_TYPE }}
sudo apt-get install libfuse2 -y
curl -o linuxdeployqt-continuous-x86_64.AppImage -L "https://objects.githubusercontent.com/github-production-release-asset-2e65be/67432158/137d29d0-c2cb-4d78-87c1-d82572655a59?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240601%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240601T154743Z&X-Amz-Expires=300&X-Amz-Signature=463a072830bf54e998cbd0bf155a7758fa41dfc7d613e88a864135d91116850c&X-Amz-SignedHeaders=host&actor_id=6456505&key_id=0&repo_id=67432158&response-content-disposition=attachment%3B%20filename%3Dlinuxdeployqt-continuous-x86_64.AppImage&response-content-type=application%2Foctet-stream"
chmod +x linuxdeployqt-continuous-x86_64.AppImage
./linuxdeployqt-continuous-x86_64.AppImage ${{ env.CMAKE_BUILD_TYPE }}/${repository_name} -appimage
zip -r ${zipfile} ${{ env.CMAKE_BUILD_TYPE }}/${repository_name}
# mkdir ../target
# mv ${zipfile} ../target
cd ..
ls -al
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*.zip