use curl to upload the package
This commit is contained in:
@@ -4,8 +4,6 @@ on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
env:
|
||||
DOTNET_INSTALL_DIR: '.\.dotnet'
|
||||
strategy:
|
||||
matrix:
|
||||
dotnet-version: [ '8.0.x' ]
|
||||
@@ -13,27 +11,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache dotnet
|
||||
id: cache-dotnet
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.DOTNET_INSTALL_DIR }}
|
||||
key: ${{ runner.os }}-dotnet-${{ matrix.dotnet-version }}
|
||||
restore-keys: ${{ runner.os }}-dotnet-${{ matrix.dotnet-version }}
|
||||
|
||||
- name: Install dotnet
|
||||
if: ${{ steps.cache-dotnet.outputs.cache-hit != 'true' }}
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: ${{ matrix.dotnet-version }}
|
||||
|
||||
# - name: Setup dotnet
|
||||
# uses: actions/setup-dotnet@v3
|
||||
# with:
|
||||
# dotnet-version: ${{ matrix.dotnet-version }}
|
||||
# cache: true
|
||||
# cache-dependency-path: packages.lock.json
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
- name: Test with dotnet
|
||||
@@ -42,29 +23,15 @@ jobs:
|
||||
run: dotnet build
|
||||
- name: Publish the package
|
||||
run: dotnet publish
|
||||
- name: List files in the repository
|
||||
|
||||
- name: Delete existing latest version
|
||||
run: |
|
||||
ls /workspace/pi-ux-ce/Simpsons_generator/bin/
|
||||
- name: List files in the repository
|
||||
curl --user ${{ secrets.USERNAME_GITEA }}:${{ secrets.PASSWORD_GITEA }} -X DELETE\
|
||||
https://gitea.tryton.geeraert.eu/api/packages/pi-ux-ce/generic/Simpsons_generator/latest/Simpsons_generator.exe
|
||||
|
||||
- name: upload latest version
|
||||
run: |
|
||||
ls /workspace/pi-ux-ce/Simpsons_generator/bin/Debug/
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls /workspace/pi-ux-ce/Simpsons_generator/bin/Debug/net8.0/
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
author_name: Pierre
|
||||
author_email: pierre@geeraert.eu
|
||||
message: 'automated push of build'
|
||||
add: '/workspace/pi-ux-ce/Simpsons_generator/bin/Debug/net8.0/Simpsons_generator.exe'
|
||||
- name: git push changes
|
||||
uses: appleboy/git-push-action@v0.0.2
|
||||
with:
|
||||
author_email: pierre@geeraert.eu
|
||||
author_name: Pierre
|
||||
branch: main
|
||||
commit: true
|
||||
commit_message: "[skip ci] Updated changes by gitea bot"
|
||||
remote: git@gitea.tryton.geeraert.eu:pi-ux-ce/Simpsons_generator.git
|
||||
ssh_key: ${{ secrets.DEPLOY_KEY }}
|
||||
curl --user ${{ secrets.USERNAME_GITEA }}:${{ secrets.PASSWORD_GITEA }} \
|
||||
--upload-file /workspace/pi-ux-ce/Simpsons_generator/bin/Debug/net8.0/Simpsons_generator.exe \
|
||||
https://gitea.tryton.geeraert.eu/api/packages/pi-ux-ce/generic/Simpsons_generator/latest/Simpsons_generator.exe
|
||||
|
||||
|
||||
Reference in New Issue
Block a user