Try generic upload
This commit is contained in:
@@ -31,39 +31,42 @@ jobs:
|
||||
with:
|
||||
name: version
|
||||
|
||||
- name: Build package
|
||||
- name: Build single file executables
|
||||
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
|
||||
# Build for Linux x64
|
||||
dotnet publish -c Release -r linux-x64 -p:Version=$(cat ../../version.txt) -o publish/linux-x64
|
||||
|
||||
- name: Upload
|
||||
- name: Upload to Gitea Generic Package Registry
|
||||
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
|
||||
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: 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
|
||||
# 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
|
||||
|
||||
- name: Install package-cleanup tool
|
||||
shell: bash
|
||||
run: |
|
||||
dotnet tool install \
|
||||
--tool-path .tools \
|
||||
package-cleanup \
|
||||
--source sh-git_sh-edraft_de
|
||||
# # 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"
|
||||
|
||||
- name: Run package-cleanup
|
||||
shell: bash
|
||||
run: |
|
||||
./.tools/sh.actions.package-cleanup
|
||||
# # Make executable
|
||||
# chmod +x .tools/package-cleanup
|
||||
|
||||
# - name: Run package-cleanup
|
||||
# shell: bash
|
||||
# run: |
|
||||
# ./.tools/package-cleanup
|
||||
|
||||
Reference in New Issue
Block a user