-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/josago97/ConsoleMediaPlayer …
…into main # Conflicts: # ConsoleMediaPlayer.Common/ConsoleHelper.cs # ConsoleMediaPlayer.Common/MediaPlayer.cs # ConsoleMediaPlayer.VideoApp/Program.cs # ConsoleMediaPlayer.VideoApp/VideoPlayer.cs
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# 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: Publish | ||
|
||
# Declaring custom variables | ||
env: | ||
PROJECT_NAMES: ConsoleMediaPlayer.ImageApp ConsoleMediaPlayer.VideoApp | ||
RELEASE_FOLDER: release | ||
REPO_NAME: ${{ github.event.repository.name }} | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
# use ubuntu-latest image to run steps on | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# uses GitHub's checkout action to checkout code form the master branch | ||
- uses: actions/checkout@v3 | ||
|
||
# Build project to the release-folder | ||
- name: Build .NET Project | ||
run: | | ||
IFS=' ' read -ra projects <<< "${{ env.PROJECT_NAMES }}" | ||
releaseFolder=${{env.RELEASE_FOLDER}} | ||
for (( i=0; i<${#projects[@]}; i++ )); do | ||
project=${projects[i]} | ||
fullPath=${releaseFolder}/${project} | ||
dotnet publish $project/$project.csproj -r -c Release -o $fullPath --nologo --self-contained true /p:PublishSingleFile=true /p:DebugType=None /p:DebugSymbols=false | ||
cd $fullPath | ||
zip -r ../${folder}.zip * | ||
cd ../.. | ||
done | ||
- name: Publish artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: ${RELEASE_FOLDER}/*.zip | ||
|
||
|