Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions for Library #489

Merged
merged 5 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/actions/build-library/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build-library
description: Builds and publishes M.F. libraries and drivers

inputs:
packageId:
required: true
path:
required: true
version:
required: true

runs:
steps:
- name: Build the library/driver
run: dotnet build -c ${{ inputs.path }} /p:Version=${{ inputs.version }}
- name: Package the library/driver
run: dotnet pack -c ${{ inputs.path }} /p:Version=${{ inputs.version }} --output .
- name: Push the library/driver to NuGet
run: dotnet nuget push ${{ inputs.packageId }}.${{ inputs.version }}.nupkg -s https://api.nuget.org/v3/index.json -k ${NUGET_TOKEN}
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/nuget-libraries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Meadow.Foundation Libraries Package Creation

on:
workflow_dispatch:

env:
version: '0.89.0'

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set VERSION variable from env.version
run: echo "VERSION=${{ env.version }} >> $GITHUB_ENV

# - uses: ./.github/actions/build-library
# with:
# packageId: Meadow.Foundation.DataLoggers.SensorReading
# path: Source/Meadow.Foundation.Libraries_and_Frameworks/DataLoggers.SensorReading/Driver/DataLoggers.SensorReading.csproj
# version: ${{ env.version }}

# - uses: ./.github/actions/build-library
# with:
# packageId: Meadow.Foundation.DataLoggers.ThingSpeak
# path: Source/Meadow.Foundation.Libraries_and_Frameworks/DataLoggers.ThingSpeak/Driver/DataLoggers.ThingSpeak.csproj
# version: ${{ env.version }}

- uses: ./.github/actions/build-library
with:
packageId: Meadow.Foundation.Displays.MicroGraphics
path: Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroGraphics/Driver/Graphics.MicroGraphics.csproj
version: ${{ env.version }}

# - uses: ./.github/actions/build-library
# with:
# packageId: Meadow.Foundation.Sensors.Location.Gnss.NmeaProcessor
# path: Source/Meadow.Foundation.Libraries_and_Frameworks/Sensors.Location.Gnss.NmeaProcessor/Driver/Sensors.Location.Gnss.NmeaProcessor.csproj
# version: ${{ env.version }}