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

Add actions #14

Merged
merged 1 commit 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
25 changes: 25 additions & 0 deletions .github/actions/build-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build-package
description: Builds and publishes M.F. libraries and drivers

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

runs:
using: "composite"
steps:
- name: Build the library/driver
shell: bash
run: dotnet build -c Release ${{ inputs.path }} /p:Version=${{ inputs.version }}
- name: Package the library/driver
shell: bash
run: dotnet pack -c Release ${{ inputs.path }} /p:Version=${{ inputs.version }} --output .
- name: Push the library/driver to NuGet
shell: bash
run: dotnet nuget push ${{ inputs.packageId }}.${{ inputs.version }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ inputs.token }}
75 changes: 75 additions & 0 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Package Creation

on:
workflow_dispatch:

env:
version: '0.89.0'
token: ${{ secrets.NUGET_TOKEN }}

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-package
with:
packageId: Meadow.Foundation.FeatherWings.CharlieWing
path: Source/CharlieWing/Driver/CharlieWing.csproj
version: ${{ env.version }}
token: ${{ env.token }}

- uses: ./.github/actions/build-package
with:
packageId: Meadow.Foundation.FeatherWings.DotstarWing
path: Source/DotstarWing/Driver/DotstarWing.csproj
version: ${{ env.version }}
token: ${{ env.token }}

- uses: ./.github/actions/build-package
with:
packageId: Meadow.Foundation.FeatherWings.GPSWing
path: Source/GPSWing/Driver/GPSWing.csproj
version: ${{ env.version }}
token: ${{ env.token }}

- uses: ./.github/actions/build-package
with:
packageId: Meadow.Foundation.FeatherWings.KeyboardWing
path: Source/KeyboardWing/Driver/KeyboardWing.csproj
version: ${{ env.version }}
token: ${{ env.token }}

- uses: ./.github/actions/build-package
with:
packageId: Meadow.Foundation.FeatherWings.LedMatrix8x16Wing
path: Source/LedMatrix8x16Wing/Driver/LedMatrix8x16Wing.csproj
version: ${{ env.version }}
token: ${{ env.token }}

- uses: ./.github/actions/build-package
with:
packageId: Meadow.Foundation.FeatherWings.MotorWing
path: Source/MotorWing/Driver/MotorWing.csproj
version: ${{ env.version }}
token: ${{ env.token }}

- uses: ./.github/actions/build-package
with:
packageId: Meadow.Foundation.FeatherWings.OLED128x32Wing
path: Source/OLED128x32Wing/Driver/OLED128x32Wing.csproj
version: ${{ env.version }}
token: ${{ env.token }}

- uses: ./.github/actions/build-package
with:
packageId: Meadow.Foundation.FeatherWings.ServoWing
path: Source/ServoWing/Driver/ServoWing.csproj
version: ${{ env.version }}
token: ${{ env.token }}