-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (48 loc) · 1.87 KB
/
dotnet-desktop.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
45
46
47
48
49
50
51
52
53
54
name: Build and Release .NET Desktop Console App
on:
push:
tags:
- 'v*'
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.400' # Replace with the desired .NET SDK version
- name: Build the .NET Console App
run: |
dotnet restore
dotnet build ./SharpRISCV/SharpRISCV.csproj --configuration Release
# Archive the package
- name: Create archive
uses: vimtor/action-zip@v1
with:
files: ./SharpRISCV/bin/Release/net7.0/
dest: SharpRISCV.zip
# Create the release: https://github.com/actions/create-release
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
# Upload release asset: https://github.com/actions/upload-release-asset
- name: Update release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: ./SharpRISCV.zip
asset_name: SharpRISCV.zip
asset_content_type: application/zip