Skip to content

Update build.yml

Update build.yml #167

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
name: build
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4.2.0
- uses: actions/setup-dotnet@v1.5.0
with:
dotnet-version: '8.0.x'
- name: Build Number Generator
uses: einaregilsson/build-number@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
- name: Build
shell: cmd
run: |
cd editor
dotnet publish sth1edwv.sln --configuration Release --output foo /p:Version=0.${{env.BUILD_NUMBER}}+${{github.sha}} --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
7z a program.zip .\foo\*
- name: Make artifact
uses: actions/upload-artifact@v4
with:
name: program
path: editor\foo\*
- name: Create release
if: github.ref == 'refs/heads/master'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
automatic_release_tag: "v0.${{env.BUILD_NUMBER}}"
prerelease: false
title: "Automatic build #${{env.BUILD_NUMBER}}"
files: editor/program.zip