Skip to content

rename

rename #59

Workflow file for this run

name: .NET
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.PAT }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Add Github Packages NuGet feed
run: >
dotnet nuget add source
--username $GITHUB_REPOSITORY_OWNER
--password ${{ secrets.PAT }}
--store-password-in-clear-text
--name github
"https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
- name: Restore dependencies
run: dotnet restore -r linux-x64
- name: Build
run: >
dotnet publish BattleTrace
--no-restore -c Release -r linux-x64 --self-contained false -o bin/publish/
-p:GenerateDocumentationFile=false
-p:PublishSingleFile=true
-p:DebugType=None
- name: SSH Config
working-directory: .github/workflows
run: bash ssh-config.sh
env:
host: ${{ secrets.host }}
port: ${{ vars.port }}
key: ${{ secrets.SSH_KEY }}
- name: Upload
run: rsync -avzh --chown=$user:$user bin/publish target:/opt/battletrace/bin
- name: Deploy
working-directory: .github/workflows
run: ssh target 'cd /opt/battletrace/ && bash -s' < deploy.sh
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
user: ${{ vars.user }}