Skip to content

Merge pull request #11 from lenndewolten/bug/fix-packing-aws-sqs-lib #2

Merge pull request #11 from lenndewolten/bug/fix-packing-aws-sqs-lib

Merge pull request #11 from lenndewolten/bug/fix-packing-aws-sqs-lib #2

on:
push:
tags:
- "aws-sqs_v[0-9]+.[0-9]+.[0-9]"
- "aws-sqs_v[0-9]+.[0-9]+.[0-9]-preview*"
- "aws-sqs_v[0-9]+.[0-9]+.[0-9]-beta*"
- "aws-sqs_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/aws-sqs_v/}" >> $GITHUB_ENV
- name: Show default environment variables
run: |
echo "The job_id is: $GITHUB_JOB" # reference the default environment variables
echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables
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@v3
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.x.x"
- 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.AmazonSQS/Dequeueable.AmazonSQS.csproj --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
run: dotnet nuget push Dequeueable.AmazonSQS.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_KEY}
env:
NUGET_KEY: ${{secrets.NUGET_KEY}}