-
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
Showing
4 changed files
with
275 additions
and
12 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,130 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
build-linux: | ||
name: Linux build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
tar -czf bbn.tar.gz bbn bbni | ||
shell: bash | ||
- name: Upload binaries | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: bbn.tar.gz | ||
asset_name: bbn-${{ env.RELEASE_VERSION }}-linux-amd64.tar.gz | ||
tag: ${{ github.ref }} | ||
|
||
build-windows: | ||
name: Windows build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
zip -r bbn.zip bbn.exe bbni.exe | ||
shell: bash | ||
- name: Upload binaries | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: bbn.zip | ||
asset_name: bbn-${{ env.RELEASE_VERSION }}-windows-amd64.zip | ||
tag: ${{ github.ref }} | ||
|
||
build-macos-arm64: | ||
name: MacOS arm64 build | ||
runs-on: macos-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
zip -r bbn.zip bbn bbni | ||
shell: bash | ||
- name: Upload binaries | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: bbn.zip | ||
asset_name: bbn-${{ env.RELEASE_VERSION }}-macos-arm64.zip | ||
tag: ${{ github.ref }} | ||
|
||
build-macos-amd64: | ||
name: MacOS amd64 build | ||
runs-on: macos-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
zip -r bbn.zip bbn bbni | ||
shell: bash | ||
- name: Upload binaries | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: bbn.zip | ||
asset_name: bbn-${{ env.RELEASE_VERSION }}-macos-amd64.zip | ||
tag: ${{ github.ref }} |
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,126 @@ | ||
name: Test Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-linux: | ||
name: Linux build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
tar -czf bbn.tar.gz bbn bbni | ||
shell: bash | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bbn-linux-amd64.tar.gz | ||
path: bbn.tar.gz | ||
|
||
build-windows: | ||
name: Windows build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
zip -r bbn.zip bbn.exe bbni.exe | ||
shell: bash | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bbn-windows-amd64.zip | ||
path: bbn.zip | ||
|
||
build-macos-arm64: | ||
name: MacOS arm64 build | ||
runs-on: macos-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
zip -r bbn.zip bbn bbni | ||
shell: bash | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bbn-macos-arm64.zip | ||
path: bbn.zip | ||
|
||
build-macos-amd64: | ||
name: MacOS amd64 build | ||
runs-on: macos-latest | ||
steps: | ||
- name: Get tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Install dependencies | ||
run: | | ||
go get ./... | ||
- name: Build | ||
run: | | ||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbn | ||
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" ./cmd/bbni | ||
- name: Compress binaries | ||
run: | | ||
zip -r bbn.zip bbn bbni | ||
shell: bash | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bbn-macos-amd64.zip | ||
path: bbn.zip |
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,5 @@ | ||
# Changelog | ||
|
||
## [[v0.1.0]](https://github.com/mlange-42/bbn/commits/v0.1.0/) | ||
|
||
Initial release of BBN, the Bayesian Belief Network library and CLI/TUI tool for [Go](https://go.dev). |
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