From 1870d5ad14dea62936d0a5887b796511128f4fce Mon Sep 17 00:00:00 2001 From: Antoine Grondin Date: Mon, 4 Nov 2024 14:00:34 +0900 Subject: [PATCH] wip --- .github/workflows/release-dev-pro.yml | 8 ++++++ .github/workflows/release-dev.yml | 40 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/.github/workflows/release-dev-pro.yml b/.github/workflows/release-dev-pro.yml index 857c96b..1f3cbdd 100644 --- a/.github/workflows/release-dev-pro.yml +++ b/.github/workflows/release-dev-pro.yml @@ -27,6 +27,7 @@ jobs: GH_ACCESS_TOKEN_FOR_HUMANLOGPRO: ${{ secrets.GH_ACCESS_TOKEN_FOR_HUMANLOGPRO }} GOARCH: ${{ matrix.arch }} CGO_ENABLED: 1 + GOBIN: /usr/local/bin/ steps: - name: Set up Go 1 uses: actions/setup-go@v5 @@ -39,6 +40,13 @@ jobs: - run: git config --global --add safe.directory '*' - run: git config --global url.https://$GH_ACCESS_TOKEN_FOR_HUMANLOGPRO@github.com/.insteadOf https://github.com/ - run: go install github.com/goware/modvendor@latest + env: + GOARCH: amd64 + - run: env + - run: go env + - run: ls -lha . + - run: ls -lha $GOPATH + - run: ls -lha $HOME/bin - run: go mod vendor - run: modvendor -copy="**/*.a **/*.h" -v - run: go build -tags pro -o /tmp/humanlog-${{ matrix.os }}-${{ matrix.arch }} ./cmd/humanlog diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index 0f39dbc..608fbc9 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -10,9 +10,49 @@ permissions: contents: write jobs: + build: + name: "build" + strategy: + matrix: + go: [stable] + os: + - ubuntu-latest + - macos-latest + arch: + - arm64 + - amd64 + runs-on: ${{ matrix.os }} + env: + GOPRIVATE: "github.com/humanlogio/humanlog-pro" + GH_ACCESS_TOKEN_FOR_HUMANLOGPRO: ${{ secrets.GH_ACCESS_TOKEN_FOR_HUMANLOGPRO }} + GOARCH: ${{ matrix.arch }} + steps: + - name: Set up Go 1 + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + cache: true + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: git config --global --add safe.directory '*' + - run: git config --global url.https://$GH_ACCESS_TOKEN_FOR_HUMANLOGPRO@github.com/.insteadOf https://github.com/ + - run: git fetch --force --tags + - run: echo "${HOME}/.humanlog/bin" >> $GITHUB_PATH + - run: curl https://humanlog.dev/install_apictl.sh | bash + - run: go install github.com/goware/modvendor@latest + - run: go mod vendor + - run: modvendor -copy="**/*.a **/*.h" -v + - run: go + env: + + + create_a_dev_release: name: create a dev release runs-on: ubuntu-latest + container: + image: ghcr.io/goreleaser/goreleaser-cross:v1.23.2 env: GOPRIVATE: "github.com/humanlogio/humanlog-pro" GH_ACCESS_TOKEN_FOR_HUMANLOGPRO: ${{ secrets.GH_ACCESS_TOKEN_FOR_HUMANLOGPRO }}