-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1303c3
commit 9a0eff8
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |