Skip to content

build.yaml: add auto release #49

build.yaml: add auto release

build.yaml: add auto release #49

Workflow file for this run

name: Build
on:
release:
types: [created]
push:
pull_request:
workflow_dispatch:
inputs:
tag:
description: 'which tag to create and release?'
required: true
default: 'v100'
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch:
- amd64
- x86
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: setup MS dev commands
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: install meson and ninja
run: pip install meson ninja
- name: Plug in vs-api3
shell: bash
run: |
git clone https://github.com/AmusementClub/vs-api3 --depth=1 --branch master api3
cp api3/api3.cc src/
sed -i -e "/vsplugin.cc'/s//&, 'src\\/api3.cc'/" meson.build
cat meson.build
- name: download VS headers and patch header location
shell: bash
run: |
git clone https://github.com/AmusementClub/vapoursynth-classic --depth=1 --branch doodle2 vapoursynth
cp vapoursynth/include/*.h src/
sed -i -e '/#include <vapoursynth/ { s|vapoursynth/||g; y|<>|""|; }' src/vsplugin.cc
- name: Meson setup
run: meson setup builddir/ -Db_vscrt=mt
- name: Meson compile
run: meson compile -C builddir/ -v
- name: Package Release
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' && github.event.inputs.tag != ''
shell: bash
run: |
git clone https://github.com/AkarinVS/exe/
cd builddir/
../exe/zip.exe -9r ../descale-${{github.ref_name}}-${{matrix.arch}}.zip *.dll
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: release-${{matrix.arch}}
path: |
builddir/descale.dll
- name: Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' && github.event.inputs.tag != ''
with:
files: "descale-${{github.ref_name}}-${{matrix.arch}}.zip"
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}