Aggiunge nuove azioni per il versionamento e il deploy
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.
This commit is contained in:
32
example-workflow.yml
Normal file
32
example-workflow.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
Reference in New Issue
Block a user