Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-#10 #12

Merged
merged 14 commits into from
Apr 6, 2024
Merged
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
33 changes: 26 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,44 @@ on:
- closed
branches:
- 'main'
push:
branches:
- "issue-#10"

jobs:
if_merged:
Setup:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- name: Set Up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: "Build multiplatform"
run: make build-multiplatform
- name: Tag
id: tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: minor
- name: Create a Release
uses: elgohr/Github-Release-Action@v5
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
uses: softprops/action-gh-release@v2
with:
title: ${{ github.head_ref }}.${{ github.sha }}
workdir: bin/
token: ${{ secrets.RELEASE_TOKEN }}
name: ${{ steps.tag.outputs.tag }}
tag_name: ${{ steps.tag.outputs.tag }}
files: |
bin/goker-darwin-amd64
bin/goker-darwin-arm64
bin/goker-freebsd-amd64
bin/goker-freebsd-arm
bin/goker-linux-amd64
bin/goker-linux-arm
bin/goker-linux-arm64
bin/goker-windows-amd64
2 changes: 1 addition & 1 deletion .hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

COMMIT_MSG_FILE=$1

echo "$(git rev-parse --abbrev-ref HEAD)\n" > ${COMMIT_MSG_FILE}
echo "$(git rev-parse --abbrev-ref HEAD)\n #none" > ${COMMIT_MSG_FILE}
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build:
go build

build-multiplatform:
mkdir -p ${BIN_FOLDER}
./build.sh

commit-check: test build
Expand All @@ -17,3 +18,8 @@ hooks:
chmod +x .hooks/pre-push
chmod +x .hooks/prepare-commit-msg
git config core.hooksPath .hooks/


tag:
git tag $(cat VERSION)
git push origin --tags
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
23 changes: 22 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@ This tool took heavy inspiration from [poker-odds](https://github.com/CookPete/p

## Installation

At this moment it can only be built from sources. See [build notes](#Build)
### Download Release

Every merge to `main` branch creates release accessible from GH page

This repo follows semantic versioning. By default it bumps version by `minor` release.
To change this behaviour you can pass these strings in your message

- `#none`
- `#patch`
- `#minor`
- `#major`

### Build from sources

See [build notes](#Build)

### Hand Odds calculation

Expand Down Expand Up @@ -43,6 +57,13 @@ Ties: 0.0%
goker hand-odds --hands KsThAcAd,8d7d5c4c --board KdTd9d2d -i 1000 --omaha
```

```
[KsThAcAd]: 10.7%
[8d7d5c4c]: 89.3%
Ties: 0.0%
4737 ms
```

## Roadmap

Technical Stuff:
Expand Down
Loading