-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.58 KB
/
dotnet-publish.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Publish
run: dotnet publish -r win10-x64 --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
- name: Install Zip
run: sudo apt-get install zip
- name: Zip the output
run: |
zip -j EntityMetadataExtractor.zip "/home/runner/work/entity-metadata-extractor/entity-metadata-extractor/Entity Metadata Extractor/bin/Release/net7.0/win10-x64/publish/Entity Metadata Extractor.exe"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}
release_name: Release ${{ github.run_id }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./EntityMetadataExtractor.zip
asset_name: EntityMetadataExtractor.zip
asset_content_type: application/zip