Skip to content

Commit

Permalink
Create workflow go.yml & update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
821869798 committed Jun 7, 2023
1 parent 2b26172 commit 140300f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
workflow_dispatch:
inputs:
tag_name:
description: 'tag name'
required: true

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- run: go build -o bin/table-export_linux_amd64 .
- run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/table-export_amd64.exe .
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o bin/table-export_darwin_amd64 .

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag_name }}
release_name: Tag:${{ github.event.inputs.tag_name }}
draft: false
prerelease: false

- name: Release
uses: softprops/action-gh-release@v1
with: # 将下述可执行文件 release 上去
tag_name: ${{ github.event.inputs.tag_name }}
files: bin/*
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ table-export 是一个高性能游戏导表工具,使用golang编写,目前

### 准备环境

1. 安装golang

2. 编译可执行文件放到examples目录下。

1. 安装golang,编译可执行文件。或者从release里下载可执行文件
2. 把可执行文件放到examples目录下
3. 工具的配置文件目录为可执行文件的相对路径的./conf/config.toml,examples里已经有一份示例配置
4. 先在config.toml里面配置好导出规则的配置,例如c# binary

Expand Down

0 comments on commit 140300f

Please sign in to comment.