Skip to content
Snippets Groups Projects
.gitlab-ci.yml 865 B
Newer Older
Michal Ondrejička's avatar
Michal Ondrejička committed
image : mcr.microsoft.com/dotnet/sdk:6.0
Loránt Bugár's avatar
Loránt Bugár committed

stages:
  - build
  - test
  - release
  - deploy

build:
  stage: build
  tags: 
    - net5
Loránt Bugár's avatar
Loránt Bugár committed
  script:
    - dotnet build

test:
  stage: test
  tags: 
    - net5
Loránt Bugár's avatar
Loránt Bugár committed
  script:
    - dotnet test

release:
  stage: release
  tags: 
    - net5
Loránt Bugár's avatar
Loránt Bugár committed
  only:
    - master
  artifacts:
    paths:
      - SDK/
Loránt Bugár's avatar
Loránt Bugár committed
    expire_in: 1 week
  script:
    - dotnet publish -c Release -o ../SDK SDK/SDK.csproj
Loránt Bugár's avatar
Loránt Bugár committed

deploy:
  stage: deploy
  tags: 
    - net5
Loránt Bugár's avatar
Loránt Bugár committed
  artifacts:
    paths:
      - SDK/
Loránt Bugár's avatar
Loránt Bugár committed
    expire_in: 1 week
  script:
    - dotnet pack -c Release
Michal Ondrejička's avatar
Michal Ondrejička committed
    - dotnet nuget add source https://gitlab.twinzo.eu/api/v4/projects/189/packages/nuget/index.json -n gitlab_tDevkit -u gitlab+deploy-token-4 -p nidd5s9XWfRVCLGbt6cH --store-password-in-clear-text
    - dotnet nuget push "SDK/bin/Release/*.nupkg" --source gitlab_tDevkit
Loránt Bugár's avatar
Loránt Bugár committed
  only:
    - master