Compare commits
4 Commits
master
...
2026.02.14
| Author | SHA1 | Date | |
|---|---|---|---|
| bcfbbfc470 | |||
| b503de71b4 | |||
| e5eb38507b | |||
| 0b0890a07d |
66
.gitea/workflows/build dev.yaml
Normal file
66
.gitea/workflows/build dev.yaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
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 sh.actions.package-cleanup/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
|
||||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.idea
|
||||||
|
.code
|
||||||
|
|
||||||
|
bin/
|
||||||
|
obj/
|
||||||
19
package-cleanup/action.yaml
Normal file
19
package-cleanup/action.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: "package cleanup"
|
||||||
|
description: "Cleans up old packages and versions"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Install set-version tool
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
dotnet tool install \
|
||||||
|
--tool-path .tools \
|
||||||
|
ShEdraft.SetVersion \
|
||||||
|
--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/set-version --suffix dev
|
||||||
16
sh.actions.sln
Normal file
16
sh.actions.sln
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sh.actions.package-cleanup", "sh.actions/sh.actions.package-cleanup\sh.actions.package-cleanup.csproj", "{F4995B6A-2CA1-4CD4-AEAC-BE397AF1910A}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{F4995B6A-2CA1-4CD4-AEAC-BE397AF1910A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{F4995B6A-2CA1-4CD4-AEAC-BE397AF1910A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{F4995B6A-2CA1-4CD4-AEAC-BE397AF1910A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{F4995B6A-2CA1-4CD4-AEAC-BE397AF1910A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
2
sh.actions/sh.actions.package-cleanup/Program.cs
Normal file
2
sh.actions/sh.actions.package-cleanup/Program.cs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
Console.WriteLine("Hello, World! from ci");
|
||||||
1
sh.actions/sh.actions.package-cleanup/README.md
Normal file
1
sh.actions/sh.actions.package-cleanup/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Gitea package cleanup
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<RootNamespace>sh.actions.package_cleanup</RootNamespace>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
|
<!-- NuGet Package Information -->
|
||||||
|
<PackAsTool>true</PackAsTool>
|
||||||
|
<ToolCommandName>package-cleanup</ToolCommandName>
|
||||||
|
|
||||||
|
<PackageId>sh.actions.package-cleanup</PackageId>
|
||||||
|
<Version Condition="'$(Version)' == ''">0.0.1</Version>
|
||||||
|
<Title>sh-edraft gitea package cleanup</Title>
|
||||||
|
<Description>Tool to cleanup gitea packages</Description>
|
||||||
|
<Authors>edraft</Authors>
|
||||||
|
<PackageProjectUrl>https://git.sh-edraft.de/sh-edraft.de/actions</PackageProjectUrl>
|
||||||
|
<RepositoryUrl>https://git.sh-edraft.de/sh-edraft.de/actions</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="README.md" Pack="true" PackagePath="\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user