Skip to content

Merge pull request #17 from OpenSpartan/release-1.0.3 #10

Merge pull request #17 from OpenSpartan/release-1.0.3

Merge pull request #17 from OpenSpartan/release-1.0.3 #10

Workflow file for this run

name: Build installer
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
workflow_dispatch:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
permissions:
contents: read
packages: write
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_URL: "https://nuget.pkg.github.com/dend/index.json"
jobs:
build:
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
source-url: ${{ env.NUGET_URL }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: Verify commit exists in origin/master
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/master
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build
working-directory: ./src/OpenSpartan.Workshop
run: dotnet build --configuration Release
- name: Test
working-directory: ./src/OpenSpartan.Workshop
run: dotnet test --configuration Release --no-build
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Install WiX
run: dotnet tool install --global wix
- name: Build installer file
working-directory: ./src/OpenSpartan.Workshop.Installer.Bundle
run: msbuild -restore -p:Configuration=Release
- name: Release
uses: softprops/action-gh-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./src/OpenSpartan.Workshop.Installer.Bundle/bin/Release/OpenSpartan.Workshop.Installer.Bundle.exe
body_path: ./CURRENTRELEASE.md
token: ${{ secrets.RELEASE_TOKEN }}