Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main

# Conflicts:
#	ConsoleMediaPlayer.Common/ConsoleHelper.cs
#	ConsoleMediaPlayer.Common/MediaPlayer.cs
#	ConsoleMediaPlayer.VideoApp/Program.cs
#	ConsoleMediaPlayer.VideoApp/VideoPlayer.cs
  • Loading branch information
josago97 committed Jul 20, 2023
2 parents 64861cc + f2ec57a commit c481e60
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
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


0 comments on commit c481e60

Please sign in to comment.