2023-08-03 02:47:26 +03:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
2023-12-26 22:49:47 +03:00
|
|
|
env:
|
2024-04-28 17:39:57 +03:00
|
|
|
GO_VERSION: '1.22'
|
2023-12-26 22:49:47 +03:00
|
|
|
|
2023-08-03 02:47:26 +03:00
|
|
|
jobs:
|
2024-02-18 03:34:54 +03:00
|
|
|
build_linux_x86_64_debug:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2024-02-18 03:34:54 +03:00
|
|
|
- name: Install libfido2-dev
|
|
|
|
run: sudo apt-get install -y libfido2-dev
|
|
|
|
- name: Build Debug
|
|
|
|
run: go build -tags debuglogging -o goldwarden_linux_x86_64_debug -v .
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: goldwarden_linux_x86_64_debug
|
|
|
|
path: ./goldwarden_linux_x86_64_debug
|
|
|
|
|
2023-12-26 22:49:47 +03:00
|
|
|
build_linux_x86_64:
|
2023-08-03 02:47:26 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
2023-12-26 22:49:47 +03:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2023-08-03 02:47:26 +03:00
|
|
|
- name: Install libfido2-dev
|
|
|
|
run: sudo apt-get install -y libfido2-dev
|
2023-12-26 22:49:47 +03:00
|
|
|
- name: Build
|
|
|
|
run: go build -o goldwarden_linux_x86_64 -v .
|
2023-09-19 23:56:27 +03:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-12-26 22:49:47 +03:00
|
|
|
name: goldwarden_linux_x86_64
|
|
|
|
path: ./goldwarden_linux_x86_64
|
2023-09-19 23:56:27 +03:00
|
|
|
|
2023-12-26 22:49:47 +03:00
|
|
|
build_linux_arm64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2023-12-26 22:49:47 +03:00
|
|
|
- name: Install libfido2-dev
|
|
|
|
run: sudo apt-get install -y libfido2-dev
|
|
|
|
- name: Build
|
|
|
|
run: GOARCH=arm64 go build -tags nofido2 -o goldwarden_linux_arm64 -v .
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: goldwarden_linux_arm64
|
|
|
|
path: ./goldwarden_linux_arm64
|
|
|
|
|
|
|
|
build_linux_x86:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2023-12-26 22:49:47 +03:00
|
|
|
- name: Build
|
|
|
|
run: GOARCH=386 go build -tags nofido2 -o goldwarden_linux_x86 -v .
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: goldwarden_linux_x86
|
|
|
|
path: ./goldwarden_linux_x86
|
|
|
|
|
|
|
|
build_macos_x86_64:
|
2024-04-28 15:10:33 +03:00
|
|
|
runs-on: macos-13
|
2023-08-24 00:26:38 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
2023-12-26 22:49:47 +03:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2024-02-04 11:39:39 +03:00
|
|
|
- name: Set up Homebrew
|
|
|
|
id: set-up-homebrew
|
|
|
|
uses: Homebrew/actions/setup-homebrew@master
|
2024-02-04 11:45:34 +03:00
|
|
|
- name: Fido2
|
|
|
|
run: brew install libfido2
|
2024-04-28 15:10:33 +03:00
|
|
|
- name: Build
|
2024-02-04 11:45:34 +03:00
|
|
|
run: go build -o "goldwarden_macos_x86_64" -v .
|
2023-09-19 23:56:27 +03:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2024-02-04 12:00:32 +03:00
|
|
|
name: goldwarden-macos_x86_64
|
|
|
|
path: ./goldwarden_macos_x86_64
|
2024-04-28 15:10:33 +03:00
|
|
|
|
2024-02-03 22:22:09 +03:00
|
|
|
build_macos_aarch64:
|
|
|
|
runs-on: macos-14
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2024-02-04 12:00:32 +03:00
|
|
|
- name: Set up Homebrew
|
|
|
|
id: set-up-homebrew
|
|
|
|
uses: Homebrew/actions/setup-homebrew@master
|
|
|
|
- name: Fido2
|
|
|
|
run: brew install libfido2
|
2024-04-28 15:10:33 +03:00
|
|
|
- name: Build
|
2024-02-04 12:00:32 +03:00
|
|
|
run: go build -o "goldwarden_macos_aarch64" -v .
|
2024-02-03 22:22:09 +03:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: goldwarden-macos_aarch64
|
2024-04-28 15:10:33 +03:00
|
|
|
path: ./goldwarden_macos_aarch64
|
|
|
|
|
2023-12-26 22:49:47 +03:00
|
|
|
build_windows_x86_64:
|
2023-08-24 00:26:38 +03:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
2023-12-26 22:49:47 +03:00
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2024-02-04 12:02:24 +03:00
|
|
|
- uses: MinoruSekine/setup-scoop@v2
|
2024-02-04 12:05:13 +03:00
|
|
|
- name: Fido2
|
|
|
|
run: |
|
|
|
|
scoop bucket add keys.pub https://github.com/keys-pub/scoop-bucket
|
|
|
|
scoop install libfido2
|
2024-04-28 15:10:33 +03:00
|
|
|
- name: Build
|
2024-02-04 12:07:03 +03:00
|
|
|
run: go build -o "goldwarden_windows_x86_64.exe" -v .
|
2023-09-19 23:56:27 +03:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-12-26 22:49:47 +03:00
|
|
|
name: goldwarden-windows_x86_64.exe
|
|
|
|
path: ./goldwarden_windows_x86_64.exe
|
2024-04-28 15:10:33 +03:00
|
|
|
|
2024-02-04 12:10:26 +03:00
|
|
|
build_windows_aarch64:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
2024-05-04 02:06:24 +03:00
|
|
|
- name: Write version
|
2024-05-04 02:31:47 +03:00
|
|
|
run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt
|
2024-04-28 15:10:33 +03:00
|
|
|
- name: Build
|
2024-02-04 12:19:39 +03:00
|
|
|
run: set GOARCH=arm64 && go build -tags nofido2 -o "goldwarden_windows_aarch64.exe" -v .
|
2024-02-04 12:10:26 +03:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: goldwarden-windows_aarch64.exe
|
|
|
|
path: ./goldwarden_windows_aarch64.exe
|