Skip to content

Commit

Permalink
Dequeueable package
Browse files Browse the repository at this point in the history
  • Loading branch information
lenndewolten committed Sep 12, 2024
1 parent d1303c3 commit 9a0eff8
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
pull_request:
branches:
- "main"

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x.x"
- name: Materialize Signing Key
id: write_sign_key_file
uses: timheuer/base64-to-file@v1
with:
fileName: "Dequeueable.snk"
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.SIGNING_KEY }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity minimal
54 changes: 54 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]"
- "v[0-9]+.[0-9]+.[0-9]-preview*"
- "v[0-9]+.[0-9]+.[0-9]-beta*"
- "v[0-9]+.[0-9]+.[0-9]-alpha*"

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Show the Github context for the triggered event
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF_NAME/v/}" >> $GITHUB_ENV
- name: Show default environment variables
run: |
echo "The run id is: $GITHUB_RUN_ID"
echo "The GitHub Actor's username is: $GITHUB_ACTOR"
echo "GitHub SHA: $GITHUB_SHA"
echo "GitHub REF: $GITHUB_REF"
echo "GitHub REF NAME: $GITHUB_REF_NAME"
echo "VERSION: $VERSION"
echo "dotnet version ${DOTNET_VERSION}"
env:
DOTNET_VERSION: ${{ vars.DOTNET_VERSION }}
- uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x.x"
- name: Materialize Signing Key
id: write_sign_key_file
uses: timheuer/base64-to-file@v1
with:
fileName: "Dequeueable.snk"
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.SIGNING_KEY }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION} --no-restore
- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- name: Pack
run: dotnet pack lib/Dequeueable/Dequeueable.csproj --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
run: dotnet nuget push Dequeueable.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_KEY}
env:
NUGET_KEY: ${{secrets.NUGET_KEY}}

0 comments on commit 9a0eff8

Please sign in to comment.