Updated publish stage to be called build, updated README.md with some instructions on how to install a release version for linux

This commit is contained in:
Kwoth
2021-08-24 23:57:44 +02:00
parent 20a7e03c9e
commit 2cb7243b10
3 changed files with 28 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
image: mcr.microsoft.com/dotnet/sdk:5.0 image: mcr.microsoft.com/dotnet/sdk:5.0
stages: stages:
- publish - build
- test - test
- upload - upload
- release - release
@@ -15,8 +15,8 @@ variables:
WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip" WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/NadekoBot-build/${CI_COMMIT_TAG}" PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/NadekoBot-build/${CI_COMMIT_TAG}"
publish: build:
stage: publish stage: build
script: script:
- "dotnet publish -c Release -r linux-x64 -o $LINUX_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj" - "dotnet publish -c Release -r linux-x64 -o $LINUX_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
- "dotnet publish -c Release -r win7-x64 -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj" - "dotnet publish -c Release -r win7-x64 -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"

View File

@@ -18,5 +18,5 @@ ENV shard_id=0
ENV total_shards=1 ENV total_shards=1
WORKDIR /app WORKDIR /app
COPY --from=build /app ./ COPY --from=build /app ./
VOLUME [ "/data" ] VOLUME [ "app/data", "app/creds.yml", "app/creds_example.yml" ]
ENTRYPOINT dotnet NadekoBot.dll "$shard_id" "$total_shards" ENTRYPOINT dotnet NadekoBot.dll "$shard_id" "$total_shards"

View File

@@ -56,9 +56,9 @@
## Fresh Installation ## Fresh Installation
- [Windows - Release](#windows-release) - [Windows - Release](#windows-release)
- [Linux - Release](#linux-release)
- [Windows - From Source](#windows-from-source) - [Windows - From Source](#windows-from-source)
- [Linux - From Source](#linux-from-source) - [Linux - From Source](#linux-from-source)
- [Linux - Release](#linux-release)
- [Docker] - [Docker]
### Windows From Source ### Windows From Source
@@ -115,6 +115,10 @@ Open Terminal (if you're on a linux with window manager) and navigate to the loc
6. Open `nadekobot/output/creds.yml` with your favorite text editor. We will use nano here 6. Open `nadekobot/output/creds.yml` with your favorite text editor. We will use nano here
7. `nano nadekobot/output/creds.yml` 7. `nano nadekobot/output/creds.yml`
8. [Enter your bot's token](#creds-guide) 8. [Enter your bot's token](#creds-guide)
- You can close nano (and save the file) by typing
- CTRL+X
- Type `y`
- Press Enter
9. Run the bot (type `3` and press enter) 9. Run the bot (type `3` and press enter)
###### Update Instructions ###### Update Instructions
@@ -125,6 +129,25 @@ Open Terminal (if you're on a linux with window manager) and navigate to the loc
4. Run the bot (type `3` and press enter) 4. Run the bot (type `3` and press enter)
5. 🎉 5. 🎉
### Linux Release
1. Download the latest release from <https://gitlab.com/Kwoth/nadekobot/-/releases>
- Look for the file called "X.XX.X-linux-x64-build.tar" and download it
2. Untar it `tar xf 2.99.8-linux-x64-build.tar`
- Rename the `output-linux-x64` to `nadekobot` (`mv output-linux-x64 nadekobot`)
3. Move into nadekobot directory and make NadekoBot executable `cd nadekobot && chmod +x NadekoBot`
5. Copy the creds.yml template `cp creds_example.yml creds.yml`
6. Open `creds.yml` with your favorite text editor. We will use nano here
7. `nano nadekobot/output/creds.yml`
8. [Enter your bot's token](#creds-guide)
- You can close nano (and save the file) by typing
- CTRL+X
- Type `y`
- Press Enter
9. Run the bot `./NadekoBot`
TODO: Updating release linux version
## Creds Guide ## Creds Guide
This document aims to guide you through the process of creating a Discord account for your bot This document aims to guide you through the process of creating a Discord account for your bot