From ce24e04f0e588436b80b1ff652bbee33d66f1cb9 Mon Sep 17 00:00:00 2001 From: xuu Date: Sun, 15 Oct 2023 10:29:54 -0600 Subject: [PATCH] build: use go install --- .ansible/playbook.yml | 2 +- .gitea/workflows/deploy.yml | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.ansible/playbook.yml b/.ansible/playbook.yml index afd0176..952e681 100644 --- a/.ansible/playbook.yml +++ b/.ansible/playbook.yml @@ -5,7 +5,7 @@ tasks: - name: Copy build to remote ansible.builtin.copy: - src: ../build/ev + src: ../ev dest: /usr/local/bin/ev owner: root group: root diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 0fe49d0..f491dd9 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -10,11 +10,6 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - fetch-tags: true - - run: apt-get update && apt-get -y install ansible - name: Set up Go @@ -22,15 +17,17 @@ jobs: with: go-version: 1.21.1 - - name: Build - run: go build -ldflags "-s -w" -o ./build/ev ./cmd/ev + - name: Install + run: go install -ldflags "-s -w" go.sour.is/tools/cmd/ev@latest + + - run: mv $(shell go env GOPATH)/bin/ev ev - name: Compress uses: https://git.sour.is/actions/ghaction-upx@v2.4.0 with: version: latest files: | - ./build/ev + ./ev args: -fq - name: Deploy