Skip to content

Commit

Permalink
review github action
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Feb 27, 2023
1 parent beb7192 commit 366aa6a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Publish
name: Publish stable release

on:
release:
types: [published]
push:
tags:
- 'v*.*.*'

jobs:
release:
name: Release

strategy:
matrix:
kind: ['linuxselfcontained', 'linux', 'windows']
Expand All @@ -18,54 +20,51 @@ jobs:
- kind: linux
os: ubuntu-latest
target: linux-x64
name: linux-x64
frameworktype: --no-self-contained
- kind: windows
os: windows-latest
target: win-x64
frameworktype: --no-self-contained

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Build Project Etherna Video Importer
- name: Build EthernaVideoImporter project
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="etherna-video-importer-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish src/EthernaVideoImporter/EthernaVideoImporter.csproj --framework net7.0 --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name"
dotnet publish src/EthernaVideoImporter/EthernaVideoImporter.csproj --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Build Project Devcon Archive Video Importer
- name: Build EthernaVideoImporter.Devcon project
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="devcon-archive-video-importer-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish src/DevconArchiveVideoImporter/DevconArchiveVideoImporter.csproj --framework net7.0 --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name"
dotnet publish src/DevconArchiveVideoImporter/DevconArchiveVideoImporter.csproj --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion EthernaVideoImporter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{1E5D1B5B-4926-4F7F-97A9-19DAE5065550}"
ProjectSection(SolutionItems) = preProject
.github\workflows\publish-app-release.yml = .github\workflows\publish-app-release.yml
.github\workflows\publish-stable.yml = .github\workflows\publish-stable.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0A3B4988-7F19-430D-BF6C-31AFD0234C44}"
Expand Down

0 comments on commit 366aa6a

Please sign in to comment.