Skip to content
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
9 changes: 9 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# Automatically sets up your devbox environment whenever you cd into this
# directory via our direnv integration:

eval "$(devbox generate direnv --print-envrc)"

# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
# for more details
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
65 changes: 65 additions & 0 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"changelog-sections": [
{
"section": "🎉 Features",
"type": "feat"
},
{
"section": "🐛 Bug Fixes",
"type": "fix"
},
{
"section": "⚡ Performance Improvements",
"type": "perf"
},
{
"section": "🔗 Dependencies",
"type": "deps"
},
{
"section": "📝 Documentation",
"type": "docs"
},
{
"section": "🏗️ Build System",
"type": "build"
},
{
"section": "🤖 Continuous Integration",
"type": "ci"
},
{
"section": "🔧 Miscellaneous Chores",
"type": "chore"
},
{
"section": "⏪ Reverts",
"type": "revert"
},
{
"section": "✅ Tests",
"type": "test"
},
{
"section": "💄 Style",
"type": "style"
},
{
"section": "♻️ Code Refactoring",
"type": "refactor"
}
],
"include-component-in-tag": false,
"packages": {
".": {
"release-type": "simple",
"include-v-in-tag": true,
"package-name": "jbinary",
"extra-files": [
"readme.md"
]
}
},
"release-type": "simple"
}
3 changes: 3 additions & 0 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.6"
}
23 changes: 23 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'segator/jbinary'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
with:
github-token: "${{ secrets.RELEASE_PLEASE_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
#if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.RELEASE_PLEASE_TOKEN}}
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build And Push

on:
pull_request:
branches:
- master
push:
branches:
- master

permissions:
contents: write
pull-requests: write
packages: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.10'
- name: Release
id: release
uses: googleapis/release-please-action@v4.2.0
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json
-
name: GoReleaser snapshot
uses: goreleaser/goreleaser-action@v6
if: ${{ ! steps.release.outputs.release_created }}
with:
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: '~> v2'
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: GoReleaser
uses: goreleaser/goreleaser-action@v6
if: ${{ steps.release.outputs.release_created }}
with:
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Github release assets
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./dist/jbinary_* --clobber
14 changes: 14 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Close stale issues and PRs"
on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: "This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days."
days-before-stale: 120
days-before-close: 30
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea/
jbinary.exe
# Added by goreleaser init:
dist/
23 changes: 23 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
project_name: jbinary
builds:
-
goos:
- linux
- windows
goarch:
- amd64
- arm64
no_unique_dist_dir: true
binary: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'

checksum:
# This is the crucial addition. It tells GoReleaser to generate
# a checksum file for each artifact individually.
split: true

# Now that `split` is true, this template will be run for each binary,
# and {{ .ArtifactName }} will be correctly populated.
name_template: '{{ .ArtifactName }}.sha256'

algorithm: sha256
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ A single windows linux binary is shiped out of the box.
## Install
### Linux
```
wget https://github.com/segator/jbinary/releases/download/0.0.5/linux_amd64_jbinary_0.0.5-ALPHA5 -O /usr/bin/JBinary && chmod 777 /usr/bin/JBinary
wget https://github.com/segator/jbinary/releases/download/0.0.6/linux_amd64_jbinary_0.0.6-ALPHA5 -O /usr/bin/JBinary && chmod 777 /usr/bin/JBinary # x-release-please-version
```

### Windows
Execute as admin
```
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://github.com/segator/jbinary/releases/download/0.0.5/windows_amd64_jbinary_0.0.5-ALPHA5.exe" -OutFile "C:\Windows\System32\JBinary.exe"
Invoke-WebRequest -Uri "https://github.com/segator/jbinary/releases/download/0.0.6/windows_amd64_jbinary_0.0.6-ALPHA5.exe" -OutFile "C:\Windows\System32\JBinary.exe" # x-release-please-version
```
## Example
```bash
Expand Down
17 changes: 17 additions & 0 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.0/.schema/devbox.schema.json",
"packages": [
"go@latest",
"goreleaser@latest"
],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
104 changes: 104 additions & 0 deletions devbox.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"lockfile_version": "1",
"packages": {
"github:NixOS/nixpkgs/nixpkgs-unstable": {
"resolved": "github:NixOS/nixpkgs/cdc68935eba9f86d155585fdf6f17af6824f38ac?lastModified=1749523198&narHash=sha256-How2kQw0psKmCdXgojc95Sf3K5maHB3qfINxTZFCAPM%3D"
},
"go@latest": {
"last_modified": "2025-05-16T20:19:48Z",
"resolved": "github:NixOS/nixpkgs/12a55407652e04dcf2309436eb06fef0d3713ef3#go",
"source": "devbox-search",
"version": "1.24.3",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/ps3admpzmc1ryvn9q7sw5xfd94dkrb3f-go-1.24.3",
"default": true
}
],
"store_path": "/nix/store/ps3admpzmc1ryvn9q7sw5xfd94dkrb3f-go-1.24.3"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/45bnqhyyq40p91k3cjw0farx3hn1swx6-go-1.24.3",
"default": true
}
],
"store_path": "/nix/store/45bnqhyyq40p91k3cjw0farx3hn1swx6-go-1.24.3"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/9z2kb6hxij7pqi0fgcn9ijhpb7ajpazs-go-1.24.3",
"default": true
}
],
"store_path": "/nix/store/9z2kb6hxij7pqi0fgcn9ijhpb7ajpazs-go-1.24.3"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/5xvi25nqmbrg58aixp4zgczilfnp7pwg-go-1.24.3",
"default": true
}
],
"store_path": "/nix/store/5xvi25nqmbrg58aixp4zgczilfnp7pwg-go-1.24.3"
}
}
},
"goreleaser@latest": {
"last_modified": "2025-05-16T20:19:48Z",
"resolved": "github:NixOS/nixpkgs/12a55407652e04dcf2309436eb06fef0d3713ef3#goreleaser",
"source": "devbox-search",
"version": "2.9.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/lqihz0f2h9zjqlhk74cayb9l74zgkxj2-goreleaser-2.9.0",
"default": true
}
],
"store_path": "/nix/store/lqihz0f2h9zjqlhk74cayb9l74zgkxj2-goreleaser-2.9.0"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/wg1ndxx3hq7lcxg0nkzgs3myrflr5jm0-goreleaser-2.9.0",
"default": true
}
],
"store_path": "/nix/store/wg1ndxx3hq7lcxg0nkzgs3myrflr5jm0-goreleaser-2.9.0"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/v17lq7ap19pajdhp04n4b7p4y5f2mxrr-goreleaser-2.9.0",
"default": true
}
],
"store_path": "/nix/store/v17lq7ap19pajdhp04n4b7p4y5f2mxrr-goreleaser-2.9.0"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/rvjwgy6zz5qwipcm709jvf3j38r552nw-goreleaser-2.9.0",
"default": true
}
],
"store_path": "/nix/store/rvjwgy6zz5qwipcm709jvf3j38r552nw-goreleaser-2.9.0"
}
}
}
}
}
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/segator/jbinary

go 1.23.10

require github.com/pkg/errors v0.9.1
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Loading
Loading