Skip to content

feat: lowercase ln in print #22

feat: lowercase ln in print

feat: lowercase ln in print #22

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build:
name: Build and Release Binaries
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
job:
- { os: ubuntu-latest , platform: linux , arch: arm64 }
- { os: ubuntu-latest , platform: linux , arch: amd64 }
- { os: ubuntu-latest , platform: darwin , arch: arm64 }
- { os: ubuntu-latest , platform: darwin , arch: amd64 }
- { os: windows-2019 , platform: windows , arch: arm64 }
- { os: windows-2019 , platform: windows , arch: amd64 }
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.x'
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
shell: bash
env:
GOOS: ${{ matrix.job.platform }}
GOARCH: ${{ matrix.job.arch }}
VERSION: ${{ github.ref_name }}
run: |
./build.sh ${{ matrix.job.platform }} ${{ matrix.job.arch }}
- name: Create tarball
shell: bash
id: tarball
run: |
PKG_suffix=".tar.gz" ; case ${{ matrix.job.platform }} in windows) PKG_suffix=".zip" ;; esac;
PKG_BASENAME=build/${{ matrix.job.platform }}-${{ matrix.job.arch }}
PKG_PATH=umbra-${{ github.ref_name }}-${{ matrix.job.platform }}-${{ matrix.job.arch }}${PKG_suffix}
PKG_PATH_SHA=${PKG_PATH}.sha256
pushd "${PKG_BASENAME}/" >/dev/null
case ${{ matrix.job.platform }} in
windows)
7z -y a "${PKG_PATH}" *
certutil -hashfile $PKG_PATH SHA256 | awk 'NR==2 { print $1 }' > $PKG_PATH_SHA
;;
*)
tar czf "${PKG_PATH}" *
shasum -a 256 $PKG_PATH | awk '{ print $1 }' > $PKG_PATH_SHA
;;
esac
popd >/dev/null
echo "PKG_PATH=${PKG_BASENAME}/${PKG_PATH}" >> $GITHUB_OUTPUT
echo "PKG_PATH_SHA=${PKG_BASENAME}/${PKG_PATH_SHA}" >> $GITHUB_OUTPUT
- name: Publish archives and packages
uses: softprops/action-gh-release@v2
with:
files: |
${{ steps.tarball.outputs.PKG_PATH }}
${{ steps.tarball.outputs.PKG_PATH_SHA }}