This repository has been archived by the owner on Feb 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50e89bf
commit 5b40b32
Showing
3 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Publish package | ||
on: | ||
release: | ||
types: | ||
- prereleased | ||
- released | ||
|
||
jobs: | ||
publishpackage: | ||
runs-on: ubuntu-latest | ||
name: Publish | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Code checkout | ||
with: | ||
persist-credentials: true | ||
ref: main | ||
fetch-depth: 2 | ||
submodules: true | ||
|
||
# Install basic tools | ||
- uses: actions/setup-node@v3 | ||
name: Setup node.js | ||
with: | ||
node-version: 18.x | ||
registry-url: https://registry.npmjs.org/ | ||
- run: sudo npm install -g ts-node typescript | ||
name: Install typescript and ts-node | ||
|
||
- name: Edit version | ||
shell: node {0} | ||
run: | | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const packagePath = path.join(process.cwd(), "package.json"); | ||
const package = JSON.parse(fs.readFileSync(packagePath, "utf8")); | ||
package.version = "${{ github.ref }}"; | ||
package.version = package.version.replace(/[A-Za-z_\/]+/, ""); | ||
fs.writeFileSync(packagePath, JSON.stringify(package, null, 2)); | ||
# Add version to environment variables | ||
- name: Add version to environment variables | ||
run: | | ||
cat package.json | jq -r '.version' > /tmp/version.txt | ||
echo "PACKAGE_VERSION=$(cat /tmp/version.txt)" >> $GITHUB_ENV | ||
# Install depencides and build | ||
- run: npm ci | ||
|
||
# Build | ||
- run: npm run build | ||
|
||
# Publish | ||
- run: npm publish --tag ${{ github.event.release.prerelease && 'next' || 'latest' }} | ||
name: Publish to npm | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} | ||
|
||
# Create pull request to update version in main branch | ||
- uses: peter-evans/create-pull-request@v4 | ||
name: Create Pull Request | ||
continue-on-error: true | ||
with: | ||
commit-message: Update version v${{ env.PACKAGE_VERSION }} | ||
delete-branch: true | ||
assignees: SirHerobrine23 | ||
reviewers: SirHerobrine23 | ||
branch: update-version | ||
title: Update package version v${{ env.PACKAGE_VERSION }} | ||
body: Auto update package version, created with GitHub Actions | ||
|
||
- name: Setup QEMU to Docker | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Setup Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login into registry Github Packages | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
cache-from: ${{ github.event_name == 'push' && 'type=gha,scope=${{ github.ref }}_${{ github.repo }}' || '' }} | ||
platforms: "linux/amd64,linux/arm64,linux/arm/v7" | ||
cache-to: type=gha,scope=${{ github.ref }}_${{ github.repo }} | ||
context: ./ | ||
push: true | ||
tags: | | ||
ghcr.io/the-bds-maneger/bdsd:latest | ||
ghcr.io/the-bds-maneger/container:latest | ||
ghcr.io/the-bds-maneger/bdsd:v${{ env.PACKAGE_VERSION }} | ||
ghcr.io/the-bds-maneger/container:v${{ env.PACKAGE_VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
# BDSd | ||
# The new BDSd | ||
|
||
Maneger you minecraft with API with local daemon or in Docker container. | ||
A unified way to manage multiple Minecraft java and Bedrock servers inside the container or locally. | ||
|
||
## What's is BDSd | ||
|
||
BDSd is 'B'e'd'rock 'S'server 'd'aemon, but it not only manages Bedrock, also java and derivatives as it ended up becoming a global platform to manage Minecraft Servers | ||
|
||
## Install BDSd | ||
|
||
- npx: `npx @the-bds-maneger/bdsd` | ||
- Windows: `npm install -g @the-bds-maneger/bdsd` | ||
- MacOS/Linux: `sudo npm install -g @the-bds-maneger/bdsd` | ||
- Android/Termux: `npm install -g @the-bds-maneger/bdsd` | ||
|
||
## Migrate `Container`/`bds-cli` to new BDSd | ||
|
||
I know that sudden changes are bad, but it always comes with improvements. | ||
|
||
the `Bds Cli` folks can get pretty used to it as most commands will be preserved inside the `local bdsd`. | ||
|
||
the `Container` folks will have to make a big change because they haven't been updated for more than two major `Bds Maneger core` updates, sorry but you'll have to manually migrate your container because I don't know which version you stopped! | ||
|
||
you will have to migrate using `bdsd server migrate <PATH>` and if you use mount volumes it has a different `PATH` than `/data` because `THIS PATH` is DEFAULT from servers from BDSd to containers and attach a shell inside the container in order to run `bdsd server migrate <PATH>`. | ||
|
||
## Daemon API | ||
|
||
A faster way to manage Minecraft servers without having to crash your main terminal or leave a window open¹ to keep running your server. | ||
|
||
> **Note** | ||
> | ||
> 1. You still need a way to leave the daemon service in the background as it is a service that exposes a Unix socket by default in the `temporary` system folder and can be changed with the `BDSD_SOCKET` ENV or the `--socket` option when starting the service. | ||
> | ||
> 2. The `Container` folks will have to get used to the new API standard which is located in the `/v2` (alias to `/`) and `/v1` (deprecated use `/v2`) routes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters