Skip to content

Commit

Permalink
Merge branch 'main' into twitter-exact-search-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
teslashibe authored Aug 16, 2024
2 parents 1db201d + fb2b0ce commit c03a195
Show file tree
Hide file tree
Showing 45 changed files with 1,897 additions and 1,568 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-goreleaser-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: goreleaser-build-test

on:
push:
pull_request:

jobs:
goreleaser: # Add this new job for GoReleaser
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: v2.1.0
args: build --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: goreleaser

on:
push:
tags:
- 'v*' # Add this line to trigger the workflow on tag pushes that match 'v*'

permissions:
id-token: write
contents: read

jobs:
goreleaser: # Add this new job for GoReleaser
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: v2.1.0
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70 changes: 70 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: static check
on: pull_request

jobs:
imports:
name: Imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: danhunsaker/[email protected]
with:
run: imports
token: ${{ secrets.GITHUB_TOKEN }}

errcheck:
name: Errcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: danhunsaker/[email protected]
with:
run: errcheck
token: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: danhunsaker/[email protected]
with:
run: lint
token: ${{ secrets.GITHUB_TOKEN }}

shadow:
name: Shadow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: danhunsaker/[email protected]
with:
run: shadow
token: ${{ secrets.GITHUB_TOKEN }}

staticcheck:
name: StaticCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: danhunsaker/[email protected]
with:
run: staticcheck
token: ${{ secrets.GITHUB_TOKEN }}

sec:
name: Sec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: danhunsaker/[email protected]
with:
run: sec
token: ${{ secrets.GITHUB_TOKEN }}
flags: "-exclude=G104"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ docs/api-reference.md
transcription.txt
snippets.txt
.env copy

# Build result of goreleaser
dist/
38 changes: 38 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Make sure to check the documentation at http://goreleaser.com
version: 2
builds:
- main: ./cmd/masa-node/main.go
ldflags:
- -w -s
- -X github.com/masa-finance/masa-oracle/internal.Version={{.Tag}}
- -X github.com/masa-finance/masa-oracle/internal.Commit={{.Commit}}
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- freebsd
goarch:
- amd64
- arm
- arm64
source:
enabled: true
name_template: '{{ .ProjectName }}-{{ .Tag }}-source'
archives:
# Default template uses underscores instead of -
- name_template: >-
{{ .ProjectName }}-{{ .Tag }}-
{{- if eq .Os "freebsd" }}FreeBSD
{{- else }}{{- title .Os }}{{end}}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{end}}
{{- if .Arm }}v{{ .Arm }}{{ end }}
checksum:
name_template: '{{ .ProjectName }}-{{ .Tag }}-checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
use: github-native
2 changes: 1 addition & 1 deletion cmd/masa-node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func main() {
// and other peers can do work we only need to check this here
// if this peer can or cannot scrape or write that is checked in other places
if node.IsStaked {
go workers.MonitorWorkers(ctx, node)
node.Host.SetStreamHandler(config.ProtocolWithVersion(config.WorkerProtocol), workers.GetWorkHandlerManager().HandleWorkerStream)
go masa.SubscribeToBlocks(ctx, node)
go node.NodeTracker.ClearExpiredWorkerTimeouts()
}
Expand Down
Loading

0 comments on commit c03a195

Please sign in to comment.