Skip to content

Commit

Permalink
Merge pull request #9 from lillo42/move-to-github-action
Browse files Browse the repository at this point in the history
Move to GitHub action
  • Loading branch information
lillo42 authored Feb 11, 2020
2 parents 95ef1cd + 418e3e4 commit 8babd78
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 23 deletions.
Binary file added .DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build
on:
push:
branches:
- master
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore --no-build
19 changes: 19 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request
on: pull_request

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore --no-build
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release
on:
release:
types: [created]
tags:
- 'v*.*.*'


jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore --no-build
publish:
name: Push project on Nuget
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v1
- name: GET Version
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:11}
- name: Setup dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Pack
run: dotnet pack ./src/CastForm -c Release --include-source -o ./artifacts/pack -p:PackageVersion=${{env.RELEASE_VERSION}}
- name: Publish to Nuget
run: dotnet nuget push ./artifacts/pack/*.nupkg -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json
- name: Publish to Github
run: dotnet nuget push ./artifacts/pack/*.nupkg -k ${{secrets.NUGET_TOKEN}} -s "github"
- name: Archive Nuget pack
uses: actions/upload-artifact@v1
with:
name: CastForm v${{env.RELEASE_VERSION}}
path: ./artifacts/pack/CastForm ${{env.RELEASE_VERSION}}.nupkg
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,5 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

.DS_Store
23 changes: 0 additions & 23 deletions azure-pipelines.yml

This file was deleted.

Binary file added sample/.DS_Store
Binary file not shown.
Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/Mozilla.IoT.WebThing/.DS_Store
Binary file not shown.
Binary file added test/.DS_Store
Binary file not shown.
Binary file added test/Mozilla.IoT.WebThing.Test/.DS_Store
Binary file not shown.

0 comments on commit 8babd78

Please sign in to comment.