Files
actions/.gitea/workflows/build dev.yaml
edraft 0332f08194
All checks were successful
Build on push / prepare (push) Successful in 19s
Build on push / build (push) Successful in 23s
Try generic upload
2026-02-14 17:56:57 +01:00

73 lines
2.3 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@dev
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 single file executables
run: |
cd sh.actions/sh.actions.package-cleanup
# Build for Linux x64
dotnet publish -c Release -r linux-x64 -p:Version=$(cat ../../version.txt) -o publish/linux-x64
- name: Upload to Gitea Generic Package Registry
run: |
cd sh.actions/sh.actions.package-cleanup
curl -X PUT \
-H "Authorization: token ${{ secrets.CI_ACCESS_TOKEN }}" \
-T publish/linux-x64/sh.actions.package-cleanup \
"https://git.sh-edraft.de/api/packages/sh-edraft.de/generic/package-cleanup/$(cat ../../version.txt)/package-cleanup-linux-x64"
# test:
# runs-on: [runner]
# needs: build
# container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
# steps:
# - name: Download and test package-cleanup tool
# shell: bash
# run: |
# # Create tools directory
# mkdir -p .tools
# # Download the Linux x64 version (since we're running on Linux)
# VERSION=$(curl -s https://git.sh-edraft.de/api/packages/sh-edraft.de/generic/package-cleanup | jq -r '.versions[0].name')
# curl -L -H "Authorization: token ${{ secrets.CI_ACCESS_TOKEN }}" \
# -o .tools/package-cleanup \
# "https://git.sh-edraft.de/api/packages/sh-edraft.de/generic/package-cleanup/$VERSION/package-cleanup-linux-x64"
# # Make executable
# chmod +x .tools/package-cleanup
# - name: Run package-cleanup
# shell: bash
# run: |
# ./.tools/package-cleanup