85 lines
2.2 KiB
YAML
85 lines
2.2 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- feature/*
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: docker
|
|
services:
|
|
localstack:
|
|
image: localstack/localstack
|
|
ports:
|
|
- "4566:4566"
|
|
env:
|
|
SERVICES: ssm,dynamodb
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.25
|
|
- name: Configure
|
|
run: |
|
|
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
|
|
- name: Test
|
|
run: |
|
|
set -xue
|
|
go get ./...
|
|
go test -p 1 ./...
|
|
env:
|
|
TEST_DYNAMO_URL: "http://localstack:4566"
|
|
GOPRIVATE: "github:com/lmika/*"
|
|
|
|
# Start Release
|
|
Site:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.24
|
|
- name: Install Hugo
|
|
run: |
|
|
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.146.0
|
|
- name: Build Site
|
|
run: |
|
|
cd _site
|
|
mkdir -p themes
|
|
git clone https://github.com/alex-shpak/hugo-book.git themes/hugo-book
|
|
npm install
|
|
hugo --minify
|
|
|
|
# 'Release MacOS':
|
|
# needs: build
|
|
# runs-on: macos
|
|
# steps:
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v2
|
|
# - name: Setup Go
|
|
# uses: actions/setup-go@v3
|
|
# with:
|
|
# go-version: 1.25
|
|
# - name: Configure
|
|
# run: |
|
|
# git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
|
|
# - name: Setup Goreleaser
|
|
# run: |
|
|
# brew install goreleaser/tap/goreleaser
|
|
# brew install goreleaser
|
|
# - name: Release
|
|
# # if: startsWith(github.ref, 'refs/tags/')
|
|
# run: |
|
|
# goreleaser release -f macos.goreleaser.yml --skip=validate --clean
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }} |