Created
October 13, 2021 21:39
-
-
Save mirmostafa/1dee303ad154532b754aaa634acb19e6 to your computer and use it in GitHub Desktop.
Git Action to build "main" branch o push
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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