Sono state aggiunte azioni per estrarre la versione da un tag, pubblicare un progetto .NET e distribuire su IIS. Queste azioni semplificano il processo di build e deploy per i progetti .NET, migliorando l'integrazione con Gitea Actions.
33 lines
805 B
YAML
33 lines
805 B
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
tags: [v*]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Estrai versione dal tag
|
|
id: ver
|
|
uses: https://<host>/<owner>/Actions/version-from-tag@v1.2.3
|
|
with:
|
|
ref-name: ${{ github.ref_name }}
|
|
|
|
- name: Publish .NET
|
|
uses: https://<host>/<owner>/Actions/publish-dotnet@v1.2.3
|
|
with:
|
|
project: src/MyApp/MyApp.csproj
|
|
output-path: publish
|
|
version: ${{ steps.ver.outputs.appver }}
|
|
|
|
- name: Deploy IIS
|
|
uses: https://<host>/<owner>/Actions/deploy-iis@v1.2.3
|
|
with:
|
|
source-path: publish
|
|
destination-path: C:\inetpub\wwwroot\myapp
|
|
site-name: MySite
|
|
app-pool-name: MyAppPool
|