Release action (#8)

* rename test workflow

* add a release action

* rename

* replace set output

* improve matrix expression

* fix

* try ld flags for smaller binaries

* remove tag from binary name

* adjust the readme commands to the release paths
This commit is contained in:
Facundo Olano 2024-02-19 21:58:52 -03:00 committed by GitHub
parent 2d84e1f2cb
commit 5e0f7cb163
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 45 additions and 9 deletions

36
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Upload release binaries
on:
push:
tags:
- '*'
jobs:
build:
name: Build Binaries
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
include:
- goos: windows
ext: '.exe'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build Binary
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o jorge-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} .
- name: Release
uses: softprops/action-gh-release@v1
with:
files: "jorge-*"

View file

@ -1,7 +1,7 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
name: Test project
on:
push:

View file

@ -1,19 +1,19 @@
# jorge
A personal (small + opinionated) site generator with org-mode support.
A personal (small + opinionated) site generator with [org-mode](https://orgmode.org/) (and markdown) support.
(NOTE: this is stil a WIP, the doc below is a wishlist, not the current behavior.)
Install from binary:
## Installation
Download the [latest release binary](https://github.com/facundoolano/jorge/releases/latest) for your platform, for example:
$ wget https://github.com/facundoolano/jorge/releases/download/latest/jorge-$(uname -m) \
-o jorge && chmod +x jorge
$ wget https://github.com/facundoolano/jorge/releases/latest/download/jorge-darwin-amd64 \
-O jorge && chmod +x jorge && mv jorge /usr/local/bin
Or install with go:
Alternatively, install with go:
$ go install github.com/facundoolano/jorge
$ go install github.com/facundoolano/jorge@latest
Usage:
## Usage
```bash
$ jorge init myblog