Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhdk committed Nov 18, 2024
1 parent c5b0df3 commit e663f33
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"

- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}

- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build

- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .

- name: Push
run: dotnet nuget push Relewise.Client.Extensions.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN}
env:
Expand Down

0 comments on commit e663f33

Please sign in to comment.