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 b8865de commit aafc4e7
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,16 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- 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: Publish
run: dotnet publish ${{ matrix.projectPath }} --runtime "${{ matrix.target }}" -c Release -o "${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}"
- name: Archive Release
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
path: ./${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}/
filename: '${{ matrix.app }}-${{ matrix.target }}-${{ github.ref_name }}.zip'
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: |
*.zip
*.gz
*.zip

0 comments on commit aafc4e7

Please sign in to comment.