build #372
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
on: | |
pull_request: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
manualTrigger: | |
description: trigger a PR or release run | |
required: true | |
default: pr | |
type: choice | |
options: | |
- pr | |
- release | |
jobs: | |
compile: | |
if: > | |
(github.event_name == 'pull_request') || | |
(github.event_name == 'workflow_dispatch' && github.event.inputs.manualTrigger == 'pr') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install needed packages | |
run: >- | |
sudo apt-get update && | |
sudo apt-get install -y --no-install-recommends --no-install-suggests --no-upgrade | |
msitools libgcab-dev winbind ninja-build wine-stable git | |
- name: Cache msvc-wine | |
id: msvc-wine-cache | |
uses: actions/cache@v4 | |
with: | |
path: msvc | |
key: msvc-wine-cache-key | |
- name: Download and install msvc-wine | |
if: steps.msvc-wine-cache.outputs.cache-hit != 'true' | |
run: |- | |
set -eux | |
git clone https://github.com/mstorsjo/msvc-wine.git | |
./msvc-wine/vsdownload.py --dest msvc --accept-license --architecture x86 | |
./msvc-wine/install.sh msvc | |
- name: Add msvc-wine to path | |
run: |- | |
set -eux | |
echo "$GITHUB_WORKSPACE/msvc/bin/x86" >> "$GITHUB_PATH" | |
- name: Echo path and run cl | |
run: |- | |
set -eux | |
echo $GITHUB_PATH | |
echo $PATH | |
cl /? | |
assemble: | |
if: > | |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') == 'true') || | |
(github.event_name == 'workflow_dispatch' && github.event.inputs.manualTrigger == 'release') | |
needs: [ compile ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Test manual release | |
run: >- | |
echo ${{github.event.inputs.manualTrigger}} |