Skip to content

auto run pipeline when tag pushed (#75) #64

auto run pipeline when tag pushed (#75)

auto run pipeline when tag pushed (#75) #64

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: CI
on:
push:
branches: [ "main", "develop" ]
tags:
- 'v*.*.*'
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
#- name: Install workloads
# run: dotnet workload install android ios maccatalyst tvos macos maui wasm-tools
- name: Restore dependencies
run: dotnet restore
working-directory: src/AvaloniaInside.Shell
- name: Build
run: dotnet build -c Release --no-restore
working-directory: src/AvaloniaInside.Shell
#- name: Test
# run: dotnet test --no-build --verbosity normal
# push nuget package if it's a tag push
- name: Push NuGet package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: src/AvaloniaInside.Shell/bin/Release/AvaloniaInside.Shell.*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}