Skip to content

fix CI: upload assets on tag push (supports draft release) #4

fix CI: upload assets on tag push (supports draft release)

fix CI: upload assets on tag push (supports draft release) #4

Workflow file for this run

name: build
on:
push:
branches: [ "master" ]
tags: [ "v*" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-2022
strategy:
matrix:
arch: [Win32, x64]
include:
- arch: Win32
suffix: x86
- arch: x64
suffix: x64
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -G "Visual Studio 17 2022" -A ${{ matrix.arch }} -B build
- name: Build
run: cmake --build build --config Release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: doc2pdf-${{ matrix.suffix }}
path: build\Release\doc2pdf.exe
- name: Upload to release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build\Release\doc2pdf.exe
tag: ${{ github.ref_name }}
asset_name: doc2pdf-${{ matrix.suffix }}.exe
overwrite: true