.gitlab-ci.yml 964 Bytes
Newer Older
nullabletype's avatar
test  
nullabletype committed
1
image: microsoft/dotnet:latest
Ste Davies's avatar
Ste Davies committed
2 3 4 5 6 7 8 9

stages:
    - build

variables:
    test: "Example.Test"

before_script:
10
    - "dotnet restore src/Core"
Ste Davies's avatar
Ste Davies committed
11 12 13 14

build:
    stage: build
    script:
15
        - "dotnet build -c Release src/Core/OctoPlus.sln"
Ste Davies's avatar
Ste Davies committed
16
        - "dotnet publish -c Release src/Core/OctoPlus.Console/OctoPlus.Console.csproj -o ../../../octoplus-release"
Ste Davies's avatar
Ste Davies committed
17 18
    artifacts:
        paths:
19
            - octoplus-release/
20 21

publish:
nullabletype's avatar
nullabletype committed
22
    stage: build
nullabletype's avatar
nullabletype committed
23 24
    only: 
        - master
25
    script:
nullabletype's avatar
test  
nullabletype committed
26 27 28 29 30
        - curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v6.2.0/powershell-6.2.0-linux-x64.tar.gz
        - mkdir -p /opt/microsoft/powershell/6.2.0
        - tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/6.2.0
        - chmod +x /opt/microsoft/powershell/6.2.0/pwsh
        - ln -s /opt/microsoft/powershell/6.2.0/pwsh /usr/bin/pwsh
nullabletype's avatar
test  
nullabletype committed
31
        - chmod +x src/Core/package.ps1
nullabletype's avatar
test  
nullabletype committed
32
        - src/Core/package.ps1 -nugetKey "$NUGETKEY"