From b06d4ddd024ba7a4f53dcdc0eb8632de1f6d595c Mon Sep 17 00:00:00 2001 From: yohamta Date: Sat, 23 Apr 2022 13:35:25 +0900 Subject: [PATCH] Setup goreleaser --- .github/workflows/release.yaml | 25 +++++++++++++++++++++++++ .gitignore | 2 ++ .goreleaser.yaml | 31 +++++++++++++++++++++++++++++++ README.md | 19 ++++++++++++++++++- 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..4854256ae --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +name: Release +on: + create: + tags: + - '*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.17.x + + - name: Check out code + uses: actions/checkout@v3 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{secrets.JOBCTL_GITHUB_TOKEN}} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 461957161..4ff061c1c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ bin/* # tmp files tmp/* + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 000000000..b0d2eb1fd --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,31 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... +builds: + - dir: cmd + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin +archives: + - replacements: + darwin: Darwin + linux: Linux + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/README.md b/README.md index dc5a61250..6145e332d 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,15 @@ jobctl is a single command that generates and executes a [DAG (Directed acyclic - [jobctl](#jobctl) - [Contents](#contents) - [Features](#features) + - [Installation](#installation) + - [Linux](#linux) + - [MacOS (ARM64)](#macos-arm64) + - [MacOS (ARM64)](#macos-arm64-1) - [Use cases](#use-cases) - [User interface](#user-interface) - [Architecture](#architecture) - [Getting started](#getting-started) - - [Installation](#installation) + - [Installation](#installation-1) - [Usage](#usage) - [Configuration](#configuration) - [Environment variables](#environment-variables) @@ -52,6 +56,19 @@ jobctl is a single command that generates and executes a [DAG (Directed acyclic - onExit / onSuccess / onFailure / onCancel handlers - Automatic data cleaning +## Installation +Download the binary from [Releases page](https://github.com/jobctl/jobctl/releases) and place it on your system. + +### Linux +``` +sudo wget https://github.com/jobctl/jobctl/releases/latest/download/jobctl_linux_amd64 -O /usr/local/bin/jobctl +sudo chmod +x /usr/local/bin/jobctl +``` + +### MacOS (ARM64) + +### MacOS (ARM64) + ## Use cases - ETL Pipeline - Batches