Skip to content

Commit

Permalink
Intermittent updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Schwartz10 committed Apr 30, 2024
1 parent 6dc33fd commit 7392fad
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true

defaults:
run:
shell: bash

permissions: {}

jobs:
build:
name: Build (${{ matrix.os }}/${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
os: Linux
arch: X64
- runner: macos-13
os: macOS
arch: X64
- runner: macos-14
os: macOS
arch: ARM64
steps:
- env:
OS: ${{ matrix.os }}
ARCH: ${{ matrix.arch }}
run: |
if [[ "$OS" != "$RUNNER_OS" || "$ARCH" != "$RUNNER_ARCH" ]]; then
echo "::error title=Unexpected Runner::Expected $OS/$ARCH, got $RUNNER_OS/$RUNNER_ARCH"
exit 1
fi
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.2

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: lotus-${{ matrix.os }}-${{ matrix.arch }}
path: glif
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cli
glif
keys.toml

dist/
41 changes: 41 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1

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:
- env:
- CGO_ENABLED=0
goos:
# - linux
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

0 comments on commit 7392fad

Please sign in to comment.