-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 2.05 KB
/
azure-queue-storage-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on:
push:
tags:
- "azure-queue-storage_v[0-9]+.[0-9]+.[0-9]"
- "azure-queue-storage_v[0-9]+.[0-9]+.[0-9]-preview*"
- "azure-queue-storage_v[0-9]+.[0-9]+.[0-9]-beta*"
- "azure-queue-storage_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/azure-queue-storage_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.AzureQueueStorage/Dequeueable.AzureQueueStorage.csproj --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
run: dotnet nuget push Dequeueable.AzureQueueStorage.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_KEY}
env:
NUGET_KEY: ${{secrets.NUGET_KEY}}