Files
actions/.gitea/workflows/build dev.yaml
edraft 9e25b8c4a1
Some checks failed
Build on push / prepare (push) Successful in 5s
Build on push / build (push) Successful in 13s
Build on push / test (push) Failing after 2s
Fixed build
2026-02-14 16:56:38 +01:00

67 lines
2.0 KiB
YAML

name: Build on push
run-name: Build on push
on:
push:
branches:
- dev
jobs:
prepare:
runs-on: [runner]
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
steps:
- uses: https://git.sh-edraft.de/sh-edraft.de/actions/set-version@v1
with:
version_suffix: dev
env:
CI_ACCESS_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }}
build:
runs-on: [runner]
needs: prepare
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
steps:
- name: Clone Repository
uses: https://github.com/actions/checkout@v3
with:
token: ${{ secrets.CI_ACCESS_TOKEN }}
- name: Download build version artifact
uses: actions/download-artifact@v3
with:
name: version
- name: Build package
run: |
cd sh.actions/sh.actions.package-cleanup
dotnet build -c Release -p:Version=$(cat ../../version.txt)
- name: Configure nuget
run: |
dotnet nuget add source --name git_sh-edraft_de --username ${{ secrets.CI_USERNAME }} --password ${{ secrets.CI_ACCESS_TOKEN }} --store-password-in-clear-text https://git.sh-edraft.de/api/packages/sh-edraft.de/nuget/index.json
- name: Upload
run: |
cd sh.actions/sh.actions.package-cleanup
VERSION_FIXED=$(cat ../../version.txt | sed 's/\.0\([0-9]\)/.\1/g' | sed 's/\.0-/-/g')
dotnet nuget push --source git_sh-edraft_de bin/Release/sh.actions.package-cleanup.$VERSION_FIXED.nupkg
test:
runs-on: [runner]
needs: build
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
steps:
- name: Install set-version tool
shell: bash
run: |
dotnet tool install \
--tool-path .tools \
package-cleanup \
--version 1.0.0 \
--add-source https://git.sh-edraft.de/api/packages/sh-edraft.de/nuget/index.json
- name: Run set-version
shell: bash
run: |
./.tools/package-cleanup