Fixed MacOS release (#3)
- Fixed MacOS release and moved UCL site into repository Reviewed-on: #3 Co-authored-by: Leon Mika <lmika@lmika.org> Co-committed-by: Leon Mika <lmika@lmika.org>
This commit is contained in:
parent
8dafa6fa8f
commit
bf879a8a78
58 changed files with 1930 additions and 102 deletions
|
|
@ -4,12 +4,10 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- feature/*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
Build:
|
||||
runs-on: docker
|
||||
services:
|
||||
localstack:
|
||||
|
|
@ -24,7 +22,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.24
|
||||
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"
|
||||
|
|
@ -35,4 +33,4 @@ jobs:
|
|||
go test -p 1 ./...
|
||||
env:
|
||||
TEST_DYNAMO_URL: "http://localstack:4566"
|
||||
GOPRIVATE: "github:com/lmika/*"
|
||||
GOPRIVATE: "github:com/lmika/*"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
name: release
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
Build:
|
||||
runs-on: docker
|
||||
services:
|
||||
localstack:
|
||||
|
|
@ -20,7 +21,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.24
|
||||
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"
|
||||
|
|
@ -30,53 +31,86 @@ jobs:
|
|||
go get ./...
|
||||
go test -p 1 ./...
|
||||
env:
|
||||
GOPRIVATE: "github:com/lmika/*"
|
||||
TEST_DYNAMO_URL: "http://localstack:4566"
|
||||
GOPRIVATE: "github:com/lmika/*"
|
||||
|
||||
release-macos:
|
||||
needs: build
|
||||
runs-on: macos-12
|
||||
Site:
|
||||
needs: Build
|
||||
runs-on: docker
|
||||
env:
|
||||
NETLIFY_SITE_ID: 987651c8-4ffd-48d8-af67-4dbd49c48887
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.22
|
||||
go-version: 1.24
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 21.1
|
||||
- name: Install Hugo
|
||||
run: |
|
||||
curl -LO https://github.com/gohugoio/hugo/releases/download/v0.146.0/hugo_extended_0.146.0_linux-amd64.deb
|
||||
apt install -y ./hugo_extended_0.146.0_linux-amd64.deb
|
||||
- name: Install Netlify CLI
|
||||
run: |
|
||||
npm install netlify-cli@15.0.1 -g
|
||||
- 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
|
||||
- name: Publish Site
|
||||
run: |
|
||||
cd _site
|
||||
netlify deploy --dir docs --prod
|
||||
|
||||
'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
|
||||
go install github.com/goreleaser/goreleaser/v2@v2.12.7
|
||||
- name: Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
goreleaser release -f macos.goreleaser.yml --skip=validate --clean
|
||||
goreleaser publish -f macos.goreleaser.yml --skip=validate --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
|
||||
HOMEBREW_TAP_PRIVATE_KEY: ${{ secrets.HOMEBREW_TAP_PRIVATE_KEY }}
|
||||
|
||||
release-linux:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.22
|
||||
- name: Configure
|
||||
run: |
|
||||
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
|
||||
- name: Release
|
||||
uses: goreleaser/goreleaser-action@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
version: latest
|
||||
args: release -f linux.goreleaser.yml --skip=validate --clean
|
||||
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:
|
||||
# go-version: 1.22
|
||||
# - name: Configure
|
||||
# run: |
|
||||
# git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
|
||||
# - name: Release
|
||||
# uses: goreleaser/goreleaser-action@v1
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# with:
|
||||
# version: latest
|
||||
# args: release -f linux.goreleaser.yml --skip=validate --clean
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue