1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +00:00

CI - publish builds on master only

other branches can be published manually
This commit is contained in:
Diogo Trindade 2023-04-14 11:42:04 +01:00
parent 2f270c9c03
commit d704d398cd
3 changed files with 12 additions and 8 deletions

View File

@ -1,6 +1,6 @@
name: Master - DocFX
on:
on:
workflow_dispatch:
push:
branches:
@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
dotnet-version: "7.0.x"
- name: Setup DocFX
run: choco install docfx -y
- name: Build Core
@ -32,4 +32,4 @@ jobs:
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: docfx/docfx_project/_site/
server-dir: /httpdocs/docs/
server-dir: /httpdocs/docs/

View File

@ -1,8 +1,10 @@
name: Master - Build
on:
on:
workflow_dispatch:
push:
branches:
- master
jobs:
version:
@ -26,11 +28,11 @@ jobs:
# If we're not in master, add the branch name to the version so it counts as prerelease
if ($BranchName -ne "master") { $VersionNumber += "-$BranchName" }
"version-number=$VersionNumber" >> $Env:GITHUB_OUTPUT
build:
needs: version
strategy:
matrix:
matrix:
include:
- os: windows-latest
rid: win10-x64

View File

@ -1,8 +1,10 @@
name: Publish Nuget packages
on:
on:
workflow_dispatch:
push:
branches:
- master
jobs:
version:
@ -43,4 +45,4 @@ jobs:
- name: Pack Artemis.UI.Shared
run: dotnet pack -c Release -p:Version=${{ needs.version.outputs.version-number }} src/Artemis.UI.Shared/Artemis.UI.Shared.csproj
- name: Push Nugets
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate