Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build & Release
on: push

permissions:
contents: read
packages: read

jobs:
on_push:
permissions:
contents: write
packages: write
name: Release ${{ matrix.mc_version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 24
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Publish package
run: |
npx \
--package @semantic-release/commit-analyzer \
--package @semantic-release/release-notes-generator \
--package @semantic-release/github \
--package @semantic-release/exec \
--package @semantic-release/git \
semantic-release
if: github.ref_name == 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
28 changes: 28 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
branches: ['main'],
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'angular',
releaseRules: [
{ type: 'docs', scope: 'README', release: 'patch' },
{ type: 'refactor', release: 'patch' },
{ type: 'style', release: 'patch' },
],
parserOpts: {
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'],
},
},
],
'@semantic-release/release-notes-generator',
'@semantic-release/github',
[
'@semantic-release/exec',
{
prepareCmd: './build.sh ${nextRelease.version}',
publishCmd: './release.sh ${nextRelease.version}',
},
],
],
};
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM alpine:latest

# <version> | 'latest'
RUN apk add --no-cache \
make gcc libc-dev \
&& rm -rf /var/cache/apk/*

RUN mkdir -p /app/

COPY Makefile /app/
COPY mcrcon.1 /app/
COPY mcrcon.c /app/

WORKDIR /app/

RUN make
RUN make install

ENTRYPOINT [ "/app/mcrcon" ]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ mcrcon is console based Minecraft [rcon](https://developer.valvesoftware.com/wik

### Installing:

##### via docker:

```yaml
docker run -it Tiiffi/mcrcon:latest
```

##### via packet manager:
See https://pkgs.org/download/mcrcon for available packages in various Linux distros (note that available packages might be outdated).

Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker build . -t $DOCKER_REGISTRY_USERNAME/mcrcon:$1
docker build . -t $DOCKER_REGISTRY_USERNAME/mcrcon:latest
2 changes: 2 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker push $DOCKER_REGISTRY_USERNAME/mcrcon:$1
docker push $DOCKER_REGISTRY_USERNAME/mcrcon:latest