Changes to self contained build
This commit is contained in:
parent
7cdc70709f
commit
ee5b0783b9
1 changed files with 14 additions and 9 deletions
|
|
@ -13,13 +13,13 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/setup-dotnet@v4
|
- uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: "9.0.x"
|
dotnet-version: "10.0.x"
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test -c Release
|
run: dotnet test -c Release
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish (self-contained linux-x64)
|
||||||
run: dotnet publish -c Release -o out
|
run: dotnet publish -c Release -r linux-x64 --self-contained true -o out
|
||||||
|
|
||||||
- name: Install deploy tools
|
- name: Install deploy tools
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -40,7 +40,7 @@ jobs:
|
||||||
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
|
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp-test/app/"
|
rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp-test/app/"
|
||||||
ssh "$DEPLOY_USER@$DEPLOY_HOST" "sudo systemctl restart minapp-test"
|
ssh "$DEPLOY_USER@$DEPLOY_HOST" "chmod +x /opt/minapp-test/app/MinApp && sudo systemctl restart minapp-test"
|
||||||
|
|
||||||
deploy_prod_manual:
|
deploy_prod_manual:
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
|
@ -50,10 +50,15 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/setup-dotnet@v4
|
- uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: "8.0.x"
|
dotnet-version: "10.0.x"
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish (self-contained linux-x64)
|
||||||
run: dotnet publish -c Release -o out
|
run: dotnet publish -c Release -r linux-x64 --self-contained true -o out
|
||||||
|
|
||||||
|
- name: Install deploy tools
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y rsync openssh-client
|
||||||
|
|
||||||
- name: Deploy PROD
|
- name: Deploy PROD
|
||||||
env:
|
env:
|
||||||
|
|
@ -69,4 +74,4 @@ jobs:
|
||||||
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
|
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp/app/"
|
rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp/app/"
|
||||||
ssh "$DEPLOY_USER@$DEPLOY_HOST" "sudo systemctl restart minapp"
|
ssh "$DEPLOY_USER@$DEPLOY_HOST" "chmod +x /opt/minapp/app/MinApp && sudo systemctl restart minapp"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue