Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
forewing committed Sep 22, 2021
1 parent 3406092 commit 5668528
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create Release

on:
push:
tags:
- 'v*'

env:
go-version: "1.17"

jobs:
release:
name: Build & Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.go-version }}
- name: Build
run: |
go run ./cmd/build -all
- name: Extract Metadata
id: extract
uses: forewing/git-metadata@v1

- name: Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.extract.outputs.changes-formatted }}
name: Release ${{ steps.extract.outputs.tag-current }}
files: |
output/*.tar.gz
output/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import "github.com/forewing/csgo-rcon"
c := rcon.New("10.114.51.41:27015", "password", time.Seconds * 2)
```

3. Execute commands use `*Client.Execute(cmd string)`. Execute once if no "\n" provided. Return result message and nil on success, empty string and an error on failure.
3. Execute commands use `*Client.Execute(cmd string)`. Execute once if no "\n" provided. Return result message and nil on success, empty string and an error on failure.

If cmd includes "\n", it is treated as a script file. Splitted and trimmed into lines. Line starts with "//" will be treated as comment and ignored. When all commands seccess, concatted messages and nil will be returned. Once failed, concatted previous succeeded messages and an error will be returned.

Expand All @@ -36,6 +36,8 @@ c := rcon.New("10.114.51.41:27015", "password", time.Seconds * 2)
go get -u github.com/forewing/csgo-rcon/cmd/csgo-rcon
```

Or download from [release page](https://github.com/forewing/csgo-rcon/releases/latest).

### Usage

```
Expand Down Expand Up @@ -88,7 +90,7 @@ L **/**/20** - **:**:**: rcon from "**.**.**.**:***": command "users"

``` sh
# First download the completion file from your server
csgo-rcon -c config.json cvarlist > cmds.txt
csgo-rcon -c config.json cvarlist > cmds.txt
# and remove top 2 and bottom 2 lines
tail -n +3 cmds.txt | head -n -2 > cmds.txt.bak && mv cmds.txt.bak cmds.txt
# then use -m flag to specify the completion file
Expand Down

0 comments on commit 5668528

Please sign in to comment.