Added package cleanup project
This commit is contained in:
66
.gitea/build dev.yaml
Normal file
66
.gitea/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
|
||||
Reference in New Issue
Block a user