Skip to content

Commit

Permalink
.github/workflows/build.yaml: add step for release
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Sep 19, 2022
1 parent 75b9f13 commit 89cc7a7
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: Build for Windows

on: [push, pull_request]
on:
push:
paths:
- 'Source/*'
- '.github/workflows/build.yaml'
workflow_dispatch:
inputs:
tag:
description: 'which tag to upload to'
default: ''

jobs:
build:
strategy:
matrix:
platform: [ windows-latest ]
arch: [ x64 ]
runs-on: ${{ matrix.platform }}
runs-on: windows-2022

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.x'

- name: install meson and ninja
run: pip install meson ninja

Expand All @@ -31,8 +32,6 @@ jobs:
- name: setup MS dev commands
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}

- name: Meson setup
run: meson setup builddir/ -Db_vscrt=mt
Expand All @@ -48,6 +47,15 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: release-${{matrix.arch}}
name: release-windows-x64
path: Source/builddir/*.dll

- name: Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != ''
with:
tag_name: ${{ github.event.inputs.tag }}
files: Source/builddir/dpid.dll
fail_on_unmatched_files: true
generate_release_notes: false
prerelease: true

0 comments on commit 89cc7a7

Please sign in to comment.