2022-06-11 01:38:09 +00:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
jobs:
|
2022-11-18 11:14:33 +00:00
|
|
|
build:
|
2025-04-29 10:04:44 +00:00
|
|
|
runs-on: docker
|
2022-07-29 23:16:23 +00:00
|
|
|
services:
|
|
|
|
localstack:
|
|
|
|
image: localstack/localstack
|
|
|
|
ports:
|
|
|
|
- "4566:4566"
|
|
|
|
env:
|
|
|
|
SERVICES: ssm,dynamodb
|
2022-06-11 01:38:09 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Go
|
2022-11-17 20:55:40 +00:00
|
|
|
uses: actions/setup-go@v3
|
2022-06-11 01:38:09 +00:00
|
|
|
with:
|
2025-04-29 10:04:44 +00:00
|
|
|
go-version: 1.24
|
2022-06-11 01:38:09 +00:00
|
|
|
- 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 ./...
|
2022-06-11 02:10:39 +00:00
|
|
|
go test -p 1 ./...
|
2022-06-11 01:38:09 +00:00
|
|
|
env:
|
|
|
|
GOPRIVATE: "github:com/lmika/*"
|
2025-05-17 01:18:40 +00:00
|
|
|
TEST_DYNAMO_URL: "http://localstack:4566"
|
2022-11-18 11:14:33 +00:00
|
|
|
|
|
|
|
release-macos:
|
|
|
|
needs: build
|
|
|
|
runs-on: macos-12
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
2024-03-02 22:48:03 +00:00
|
|
|
go-version: 1.22
|
2022-11-18 11:14:33 +00:00
|
|
|
- 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: |
|
2024-03-02 22:48:03 +00:00
|
|
|
goreleaser release -f macos.goreleaser.yml --skip=validate --clean
|
2022-11-18 11:14:33 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
release-linux:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
2024-03-02 22:48:03 +00:00
|
|
|
go-version: 1.22
|
2022-11-18 11:14:33 +00:00
|
|
|
- name: Configure
|
|
|
|
run: |
|
|
|
|
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
|
2022-06-11 01:38:09 +00:00
|
|
|
- name: Release
|
|
|
|
uses: goreleaser/goreleaser-action@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
version: latest
|
2024-03-02 22:48:03 +00:00
|
|
|
args: release -f linux.goreleaser.yml --skip=validate --clean
|
2022-06-11 01:38:09 +00:00
|
|
|
env:
|
2022-10-16 22:01:06 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
|