Skip to content

Instantly share code, notes, and snippets.

@mirmostafa
Created October 13, 2021 21:39
Show Gist options
  • Save mirmostafa/1dee303ad154532b754aaa634acb19e6 to your computer and use it in GitHub Desktop.
Save mirmostafa/1dee303ad154532b754aaa634acb19e6 to your computer and use it in GitHub Desktop.
Git Action to build "main" branch o push
name: Build main branch on push
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Initialize Actions
uses: actions/checkout@v2
- name: Initialize .Net
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
include-prerelease: true
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment