Files
Test/.gitea/workflows/PreRelease.yaml
2026-03-04 19:36:35 +01:00

43 lines
1.5 KiB
YAML

name: Build and Release Prerelease ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
run-name: Building and Releasing Prerelease Branch ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} 🚀
on:
push:
tags:
- '**'
jobs:
build:
runs-on: ubuntu-latest
if: ${{ gitea.ref == 'refs/tags/*-origin/develop' }}
strategy:
matrix:
dotnet: [ '8.0.405' ]
publishprofile: [ 'PublishLinuxX64', 'PublishWinX64' ]
name: Publish with Dotnet ${{ matrix.dotnet }} and Profile ${{ matrix.publishprofile }}
steps:
- name: Clone Project
uses: actions/checkout@master
with:
ref: prerelease
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Build / Publish Project
run: dotnet publish GiteaTest.sln -p:PublishProfile=${{ matrix.publishprofile }}
- name: Pack Linux Release
if: ${{ matrix.publishprofile == 'PublishLinuxX64' }}
run: tar -cvzf ${{ matrix.publishprofile }}.tar.gz -C GiteaTest/publish .
- name: Pack Windows Release
if: ${{ matrix.publishprofile == 'PublishWinX64' }}
run: cd GiteaTest/publish/ && zip ../../${{ matrix.publishprofile }}.zip *
- name: Release Files
uses: akkuman/gitea-release-action@v1
with:
name: Yee
body: Test
prerelease: true
md5sum: true
files: |-
${{ matrix.publishprofile }}.*