Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 1e5112f

Browse files
authored
Add github workflow
1 parent 97d2713 commit 1e5112f

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: .NET Core
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
18+
19+
20+
# Install the .NET Core workload
21+
- name: Install .NET Core
22+
uses: actions/setup-dotnet@v1
23+
with:
24+
dotnet-version: 3.1.100
25+
26+
- name: Find and Replace
27+
uses: jacobtomlinson/gha-find-replace@master
28+
with:
29+
find: "{TAG-VERSION}"
30+
replace: ${GITHUB_REF##*/}
31+
include: "AssemblyInfo1.cs" # Will match all README.md files in any nested directory
32+
33+
# Setup MSBuild
34+
- name: Setup MSBuild.exe
35+
uses: microsoft/[email protected]
36+
37+
38+
# Build Project
39+
- name: Build Project
40+
run: msbuild/p:Configuration=Release /p:Platform:"Any CPU"
41+
42+
# Zip Relase
43+
- name: Compress files # This would actually build your project, using zip for an example artifact
44+
run: zip --junk-paths "SPEdit-${GITHUB_REF##*/}" bin/Release/*
45+
46+
- name: Create Release
47+
id: create_release
48+
uses: actions/create-release@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
tag_name: ${{ github.ref }}
53+
release_name: Release ${{ github.ref }}
54+
draft: false
55+
prerelease: false
56+
57+
- name: Upload Release Asset
58+
id: upload-release-asset
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
64+
asset_path: ./SPEdit-${GITHUB_REF##*/}.zip
65+
asset_name: SPEdit-${GITHUB_REF##*/}.zip
66+
asset_content_type: application/zip

0 commit comments

Comments
 (0)