Skip to content

Commit

Permalink
Revert: Remove redundant pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
calebkiage committed Nov 1, 2023
1 parent 40bd0f8 commit 5075616
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release solution

on:
workflow_dispatch:
push:
# paths: ['src/**', '.github/workflows/**', 'msgraph-cli-core.sln']

jobs:
build:
runs-on: ubuntu-latest
env:
MS_NUGET_URL: https://nuget.pkg.github.com/microsoft/index.json
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core SDK 6
uses: actions/[email protected]
with:
dotnet-version: 7.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Install dependencies
run: dotnet restore
- name: Test
run: dotnet test --no-restore
- id: publish
name: Publish
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: dotnet publish --no-restore --verbosity normal -c Release
- id: pack
name: Pack
if: ${{ steps.publish.outcome == 'success' }}
run: dotnet pack --no-restore --no-build --verbosity normal -c Release
- name: Upload Nuget Package
if: ${{ steps.pack.outcome == 'success' }}
uses: actions/upload-artifact@v3
with:
name: drop
path: |
./src/Microsoft.Graph.Cli.Core/bin/Release/*.nupkg
deploy:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 7.x
- uses: actions/download-artifact@v3
with:
name: drop
- run: dotnet nuget push "*.nupkg" --skip-duplicate -s https://nuget.pkg.github.com/microsoftgraph/index.json -k ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5075616

Please sign in to comment.