Added prod build [skip-ci]
This commit is contained in:
45
.gitea/workflows/build.yaml
Normal file
45
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Build on push
|
||||||
|
run-name: Build on push
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
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@master
|
||||||
|
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.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.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"
|
||||||
Reference in New Issue
Block a user