Skip to content

Commit

Permalink
replace azure devops with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Blind-Striker committed Feb 1, 2023
1 parent 1965858 commit 4531748
Show file tree
Hide file tree
Showing 17 changed files with 717 additions and 411 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build-macos

on:
push:
paths-ignore:
- "**.md"
- LICENSE
branches:
- "master"
pull_request:
paths-ignore:
- "**.md"
- LICENSE
branches:
- master

jobs:
build-and-test:
runs-on: macos-10.15

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Init
run: chmod +x ./build.sh

- name: Install NuGet
uses: NuGet/[email protected]

- name: Setup Testspace
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Install .NET 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"

- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Install .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"

- name: Install .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"

- name: Build
run: ./build.sh --target build

- name: Run Tests
run: ./build.sh --target tests --exclusive

- name: Push result to Testspace server
run: |
testspace [macos]**/*.trx
if: always()
65 changes: 65 additions & 0 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build-ubuntu

on:
push:
paths-ignore:
- "**.md"
- LICENSE
branches:
- "master"
pull_request:
paths-ignore:
- "**.md"
- LICENSE
branches:
- master

jobs:
build-and-test:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Init
run: chmod +x ./build.sh

- name: Install NuGet
uses: NuGet/[email protected]

- name: Setup Testspace
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Install .NET 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"

- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Install .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"

- name: Install .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"

- name: Build
run: ./build.sh --target build

- name: Run Tests
run: ./build.sh --target tests --exclusive

- name: Push result to Testspace server
run: |
testspace [linux]**/*.trx
if: always()
59 changes: 59 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: build-windows

on:
push:
paths-ignore:
- "**.md"
- LICENSE
branches:
- "master"
pull_request:
paths-ignore:
- "**.md"
- LICENSE
branches:
- master

jobs:
build-and-test:
runs-on: windows-2019

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Testspace
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Install .NET 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"

- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Install .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"

- name: Install .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"

- name: Build
run: .\build.ps1 --target build

- name: Run Tests
run: .\build.ps1 --target tests --exclusive

- name: Push result to Testspace server
run: |
testspace [windows]**/*.trx
if: always()
75 changes: 75 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: "publish-nuget"

on:
workflow_dispatch:
inputs:
package-version:
description: "Package Version"
required: true
package-source:
type: choice
description: Package Source
required: true
default: "myget"
options:
- myget
- nuget
package-id:
type: choice
description: Package Id
required: true
default: "LocalStack.AwsLocal"
options:
- LocalStack.AwsLocal

jobs:
publish-nuget:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Init
run: chmod +x ./build.sh

- name: Install NuGet
uses: NuGet/[email protected]

- name: Install .NET 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"

- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Install .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"

- name: Install .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"

- name: Build & Test
run: ./build.sh

- name: "Print Version"
run: |
echo "Package Version: ${{ github.event.inputs.package-version }}"
- name: Nuget Pack
run: ./build.sh --target nuget-pack --package-source ${{ github.event.inputs.package-source }} --package-id ${{ github.event.inputs.package-id }} --package-version ${{ github.event.inputs.package-version }}

- name: MyGet Push
if: ${{ github.event.inputs.package-source == 'myget' }}
run: ./build.sh --target nuget-push --package-source ${{ github.event.inputs.package-source }} --package-id ${{ github.event.inputs.package-id }} --package-version ${{ github.event.inputs.package-version }} --package-secret ${{secrets.MYGET_API_KEY}}

- name: NuGet Push
if: ${{ github.event.inputs.package-source == 'nuget' }}
run: ./build.sh --target nuget-push --package-source ${{ github.event.inputs.package-source }} --package-id ${{ github.event.inputs.package-id }} --package-version ${{ github.event.inputs.package-version }} --package-secret ${{secrets.NUGET_API_KEY}}
Loading

0 comments on commit 4531748

Please sign in to comment.