Skip to content

Commit

Permalink
Create dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Melnikov committed Aug 20, 2024
1 parent b34ae83 commit b8865de
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: .NET

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
tags:
- "*.*.*"

jobs:
build:
Expand Down Expand Up @@ -36,13 +35,21 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# - name: Restore dependencies
# run: dotnet restore ./src
# - name: Build
# run: dotnet restore ./src
- name: Publish
run: dotnet publish ${{ matrix.projectPath }} --runtime "${{ matrix.target }}" -c Release -o ./output
- uses: actions/upload-artifact@v4
- name: Publish and pack
run: |
release_name="${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}"
# Publish
dotnet publish ${{ matrix.projectPath }} --runtime "${{ matrix.target }}" -c Release -o "$release_name"
# Pack files
7z a -tzip "${release_name}.zip" "./${release_name}/*"
# Delete output directory
rm -r "$release_name"
- name: Create release
uses: softprops/action-gh-release@v2
with:
name: ${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}
path: ./output
files: |
*.zip
*.gz

0 comments on commit b8865de

Please sign in to comment.