Skip to content

fix xss

fix xss #842

Workflow file for this run

name: CI-Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled'
required: false
default: false
env:
VNOTE_VER: 3.18.1
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: windows-2019
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
config:
- name: "Build on Win64 Qt 5.15"
arch: win64_msvc2019_64
qt: 5.15.2
qt_modules: qtwebengine
qt_tools: tools_opensslv3_x64
qt_major: 5
suffix: "-windows7"
- name: "Build on Win64 Qt 6.5"
arch: win64_msvc2019_64
qt: 6.5.3
qt_modules: "qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat"
qt_tools: tools_opensslv3_x64
qt_major: 6
suffix: ""
steps:
# Checks-out your repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Init Submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ../Qt
key: ${{runner.os}}-${{matrix.config.arch}}-QtCache-${{matrix.config.qt}}
- name: Install Qt Official Build
uses: jurplel/install-qt-action@v3
with:
version: ${{matrix.config.qt}}
target: desktop
arch: ${{matrix.config.arch}}
modules: ${{matrix.config.qt_modules}}
tools: ${{matrix.config.qt_tools}}
cache: 'true'
- name: Create Build Dir
shell: bash
run: mkdir build
working-directory: ${{runner.workspace}}
- name: Clone OpenSSL on 5.15
shell: bash
if: ${{startsWith(matrix.config.qt, '5.15')}}
run: |
git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git --depth=1
working-directory: ${{runner.workspace}}/build
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Configure and Build Project
shell: cmd
run: |
cmake --version
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} -DOPENSSL_EXTRA_LIB_DIR=${{runner.workspace}}\build\openssl-utils.git\1.1.1j\Win_x64 %GITHUB_WORKSPACE%
cmake --build .
cmake --build . --target=pack
7z x VNote*.zip -o*
dir
working-directory: ${{runner.workspace}}/build
- name: Rename on 5.15
shell: bash
if: ${{startsWith(matrix.config.qt, '5.15')}}
run: |
mv VNote-${{env.VNOTE_VER}}-win64 VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
mv VNote-${{env.VNOTE_VER}}-win64.zip VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip
working-directory: ${{runner.workspace}}/build
- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:
name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
- name: Archive Installer
if: ${{!startsWith(matrix.config.qt, '5.15')}}
uses: actions/upload-artifact@v2
with:
name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.msi
path: ${{runner.workspace}}/build/VNote*.msi
- name: Update Tag
if: github.ref == 'refs/heads/master'
shell: bash
run: |
git tag --force continuous-build ${GITHUB_SHA}
git push --force --tags
- name: Update Continuous Build Release
if: github.ref == 'refs/heads/master'
uses: johnwbyrd/update-release@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
# glob not supported
files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip
release: Continuous Build
tag: continuous-build
- name: Release
if: github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, '[Release]')
uses: ncipollo/release-action@v1.11.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
# glob not supported
artifacts: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
commit: master
tag: v${{env.VNOTE_VER}}
allowUpdates: true
draft: true