Skip to content

Push to nuget only if commit was done on main branch #35

Push to nuget only if commit was done on main branch

Push to nuget only if commit was done on main branch #35

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup dotnet 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.302'
- name: Build and Test
run: ./Build.ps1
shell: pwsh
- name: Push to NuGet
if: github.ref == 'refs/heads/main'
env:
NUGET_URL: https://api.nuget.org/v3/index.json
NUGET_API_KEY: ${{ secrets.NUGET_FRAKTALIO_CI_API_KEY }}
run: ./Push.ps1
shell: pwsh
- name: Artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: artifacts/**/*