Files
Test/.gitea/workflows/PreRelease.yaml
thx20001 971d01ff33
Some checks failed
Build and Release Prerelease / Publish with Dotnet 8.0.405 and Profile PublishLinuxX64 and ${GITEA_HEAD_REF:-${GITEA_REF#refs/heads/}} (push) Successful in 1m22s
Build and Release Prerelease / Publish with Dotnet 8.0.405 and Profile PublishWinX64 and ${GITEA_HEAD_REF:-${GITEA_REF#refs/heads/}} (push) Has been cancelled
sf5
2026-03-04 19:56:38 +01:00

47 lines
1.6 KiB
YAML

name: Build and Release Prerelease
run-name: Building and Releasing Prerelease Branch 🚀
on:
push:
tags:
- 'p**'
- '!r**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '8.0.405' ]
publishprofile: [ 'PublishLinuxX64', 'PublishWinX64' ]
name: Publish with Dotnet ${{ matrix.dotnet }} and Profile ${{ matrix.publishprofile }} and ${GITEA_HEAD_REF:-${GITEA_REF#refs/heads/}}
steps:
- name: Extract Tag Message
shell: bash
run: echo "tag_message=$(git tag -l --format='%(contents:subject)'${GITHUB_REF#refs/*/})" >> $GITHUB_ENV
id: extract_tag_message
- 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: ${{ steps.extract_tag_message.outputs.tag_message }}
prerelease: true
md5sum: true
files: |-
${{ matrix.publishprofile }}.*