build: use go install
This commit is contained in:
parent
2e79ac4460
commit
ce24e04f0e
|
@ -5,7 +5,7 @@
|
||||||
tasks:
|
tasks:
|
||||||
- name: Copy build to remote
|
- name: Copy build to remote
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: ../build/ev
|
src: ../ev
|
||||||
dest: /usr/local/bin/ev
|
dest: /usr/local/bin/ev
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
|
@ -10,11 +10,6 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: true
|
|
||||||
|
|
||||||
- run: apt-get update && apt-get -y install ansible
|
- run: apt-get update && apt-get -y install ansible
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
|
@ -22,15 +17,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.1
|
go-version: 1.21.1
|
||||||
|
|
||||||
- name: Build
|
- name: Install
|
||||||
run: go build -ldflags "-s -w" -o ./build/ev ./cmd/ev
|
run: go install -ldflags "-s -w" go.sour.is/tools/cmd/ev@latest
|
||||||
|
|
||||||
|
- run: mv $(shell go env GOPATH)/bin/ev ev
|
||||||
|
|
||||||
- name: Compress
|
- name: Compress
|
||||||
uses: https://git.sour.is/actions/ghaction-upx@v2.4.0
|
uses: https://git.sour.is/actions/ghaction-upx@v2.4.0
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
files: |
|
files: |
|
||||||
./build/ev
|
./ev
|
||||||
args: -fq
|
args: -fq
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
|
|
Loading…
Reference in New Issue
Block a user