Skip to content

Update main.yml

Update main.yml #29

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- master
name: Create Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: setup MS-build
uses: microsoft/setup-msbuild@v1
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: setup MS-build
uses: microsoft/[email protected]
- name: Build
run: msbuild "PlanningCenter to OPS.sln" /t:Restore /p:Configuration=Release /p:Platform="Any CPU"
- name: Run publish
run: dotnet publish -c Release -p:PublishSingleFile=true --self-contained false "PlanningCenter to OPS\\PlanningCenter to OPS.csproj"
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
- name: upload windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "PlanningCenter to OPS\\bin\\Release\\net8.0-windows\\win-x64\\publish\\PlanningCenter to OPS.exe"
asset_name: "PlanningCenter to OPS.exe"
asset_content_type: application/exe