From 6367f20779481883d3f6da9e209f19629cdb8c10 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Tue, 30 Mar 2021 23:09:48 +0200 Subject: [PATCH 1/4] Adding a nuget auto-pusher. --- .github/workflows/common.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/common.yml diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml new file mode 100644 index 00000000..ec9da9d7 --- /dev/null +++ b/.github/workflows/common.yml @@ -0,0 +1,22 @@ +name: Publish to nuget +on: + push: + tags: + - 'v*' + +jobs: + publish: + name: build, pack & publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + # Publish + - name: publish on version change + id: publish_nuget + uses: rohith/publish-nuget@v2 + with: + PROJECT_FILE_PATH: Kyoo.Common/Kyoo.Common.csproj + PACKAGE_NAME: Kyoo.Common + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + INCLUDE_SYMBOLS: true From 71a49a94a4827dc0a6c161f64a5d30831cc19499 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 31 Mar 2021 22:19:59 +0200 Subject: [PATCH 2/4] Creating a CD file that build the app. --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..55d03afb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release the application + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: + - ubuntu-latest + #- windows-latest + #- macOS-latest + steps: + - uses: actions/checkout@v1 + - name: Checkout submodules + run: git submodule update --init --recurse + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + - name: Build the app + run: dotnet publish -c Release -o dist + - uses: actions/upload-artifact@v2 + with: + name: artifact-${{matrix.os}} + path: dist/* From ef769e7eb3fb2b8e45aa8f34fc71cc70865cf048 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 31 Mar 2021 22:21:04 +0200 Subject: [PATCH 3/4] Fixing recursive submodule clone. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55d03afb..79c9d892 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Checkout submodules - run: git submodule update --init --recurse + run: git submodule update --init --recursive - name: Setup .NET uses: actions/setup-dotnet@v1 with: From 7beff87cbf31dd55586afd0936c39606164a99df Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 31 Mar 2021 22:48:49 +0200 Subject: [PATCH 4/4] Artifacts are now self contained. --- .github/workflows/release.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79c9d892..67009358 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,10 +10,16 @@ jobs: runs-on: ${{matrix.os}} strategy: matrix: - os: - - ubuntu-latest - #- windows-latest - #- macOS-latest + include: + - os: ubuntu-latest + runtime: linux-x64 + artifact: linux + # - os: windows-latest + # runtime: win-x64 + # artifact: windows + - os: macOS-latest + runtime: osx-x64 + artifact: macos steps: - uses: actions/checkout@v1 - name: Checkout submodules @@ -23,8 +29,8 @@ jobs: with: dotnet-version: 5.0.x - name: Build the app - run: dotnet publish -c Release -o dist + run: dotnet publish -r ${{matrix.runtime}} -c Release -o dist Kyoo - uses: actions/upload-artifact@v2 with: - name: artifact-${{matrix.os}} + name: kyoo_${{matrix.artifact}}.zip path: dist/*