Skip to content

Commit

Permalink
Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulBernal authored Nov 22, 2024
1 parent bcbbbf2 commit a32349f
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Create a report to help us squash bugs!

---

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Please also ensure that this is not a duplicate issue :)
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

## Summary of Bug

<!-- Concisely describe the issue -->

## Expected Behaviour

<!-- What is the expected behaviour? -->

## Version

<!-- git commit hash or release version -->

## Steps to Reproduce

<!-- What commands in order should someone run to reproduce your problem? -->

____

#### For Admin Use

- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged/assigned
17 changes: 17 additions & 0 deletions .github/workflows/Json-validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: JSON check

on:
push:
paths:
- '**.json'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: json-syntax-check
uses: limitusus/json-syntax-check@v2
with:
pattern: "\\.json$"
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is a basic workflow that is manually triggered

name: compile bcna

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# This workflow makes x86_64 binaries for mac, windows, and linux.

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
targetos: [darwin, linux]
include:
- targetos: windows
arch: amd64
name: bcna ${{ matrix.arch }} for ${{ matrix.targetos }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "^1.23"
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}

- name: run tests
run: go test ./...

# we build and install in case we want to run it or capture an artifact as we do in the step below.
- name: Compile bcnad
run: |
go build ./...
go install ./...
# now uploads genesis.json and bin
- uses: actions/upload-artifact@v3
with:
name: bcnad ${{ matrix.targetos }} ${{ matrix.arch }}
path: build/bcnad
33 changes: 33 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.23.1
- uses: actions/checkout@v4

- name: golangci-lint-bcnad
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout 30m
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Release"

on:
release:
types: [published]
jobs:
draft-release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Copy Binary
run: |
make build-reproducible-all
- name: List files
run: ls -R

- name: Draft Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
build/bcnad_linux_arm64.tar.gz
build/bcnad_linux_amd64.tar.gz
build/bcnad_sha256.txt

0 comments on commit a32349f

Please sign in to comment.