From 5e0f7cb163719fab40282c9a22bad612c4cf8143 Mon Sep 17 00:00:00 2001 From: Facundo Olano Date: Mon, 19 Feb 2024 21:58:52 -0300 Subject: [PATCH] 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 --- .github/workflows/release.yml | 36 ++++++++++++++++++++++++++ .github/workflows/{go.yml => test.yml} | 2 +- README.md | 16 ++++++------ 3 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release.yml rename .github/workflows/{go.yml => test.yml} (96%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..77572f8 --- /dev/null +++ b/.github/workflows/release.yml @@ -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-*" diff --git a/.github/workflows/go.yml b/.github/workflows/test.yml similarity index 96% rename from .github/workflows/go.yml rename to .github/workflows/test.yml index d36ceed..85a6eaf 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/README.md b/README.md index a813651..0bbbb29 100644 --- a/README.md +++ b/README.md @@ -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