Skip to content

Commit

Permalink
Merge pull request #24 from guitarrapc/feat/ci
Browse files Browse the repository at this point in the history
feat: switch ci to github actions
  • Loading branch information
guitarrapc authored Nov 24, 2020
2 parents 7eca228 + 545b811 commit 1e9cae0
Show file tree
Hide file tree
Showing 26 changed files with 376 additions and 195 deletions.
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: dotnet-build

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"

jobs:
build-dotnet:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.x
- run: dotnet build ./src/SkiaSharp.QrCode/ -c Debug
- run: dotnet build ./samples/ManualGenerate/ -c Debug
- run: dotnet build ./samples/SimpleGenerate/ -c Debug
- run: dotnet test ./tests/SkiaSharp.QrCode.Tests.net31/ -c Debug
- run: dotnet test ./tests/SkiaSharp.QrCode.Tests.net50/ -c Debug -p:CollectCoverage=true -p:CoverletOutputFormat=opencover
- uses: codecov/codecov-action@v1
with:
file: ./tests/SkiaSharp.QrCode.Tests.net50/coverage.opencover.xml
flags: unittests
fail_ci_if_error: true
verbose: true
56 changes: 56 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: release

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*" # only tag

jobs:
build-dotnet:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
# tag
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# build
- run: dotnet build ./src/SkiaSharp.QrCode/ -c Release -p:Version=${{ env.GIT_TAG }}
# pack
- run: dotnet pack ./src/SkiaSharp.QrCode/ -c Release -p:Version=${{ env.GIT_TAG }} -o ./pack
- uses: actions/upload-artifact@v2
with:
name: nuget
path: ./pack/

create-release:
needs: [build-dotnet]
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
steps:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# Create Release
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- uses: actions/download-artifact@v2
# upload nuget
- run: dotnet nuget push "./nuget/*.nupkg" --skip-duplicate -s https://www.nuget.org/api/v2/package -k ${{ secrets.SYNCED_NUGET_KEY }}
Loading

0 comments on commit 1e9cae0

Please sign in to comment.