-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (40 loc) · 1.27 KB
/
release.yml
File metadata and controls
49 lines (40 loc) · 1.27 KB
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
name: Build and Package
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
GITHUB_ACTIONS: true
PUBLISH_DIR: bin/Release/net8.0/win-x64/publish
steps:
# Checkout the code
- name: Checkout
uses: actions/checkout@v4
# Setup .NET SDK
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
# Run tests
# - name: Test
# run: dotnet test ConvertApi.Cli.Tests
# Build the project
- name: Build
run: dotnet publish ConvertApi.Cli/ConvertApi.Cli.csproj -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
# Create a zip package
# - name: Create ZIP package
# run: |
# mkdir -p output
# zip -j output/convertApi-cli.zip ConvertApi.Cli/bin/Release/net8.0/win-x64/publish/*
# Upload the artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: convertApi-cli
path: ConvertApi.Cli/bin/Release/net8.0/win-x64/publish/convertApi-cli.zip
retention-days: 1 # Storing it for 1 day, not to exceed free plan.