forked from zeroKilo/STH1EDWV
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.13 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on: [push, pull_request]
jobs:
build:
name: build
runs-on: windows-latest
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/[email protected]
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