This commit is contained in:
parent
b7f4d06731
commit
fd913404c8
|
@ -5,7 +5,7 @@
|
|||
tasks:
|
||||
- name: Copy build to remote
|
||||
ansible.builtin.copy:
|
||||
src: ../build/sour.is-paste
|
||||
src: ../sour.is-paste
|
||||
dest: /usr/local/bin/sour.is-paste
|
||||
mode: u=rwx,g=rx,o=rx
|
||||
owner: root
|
||||
|
|
|
@ -2,7 +2,7 @@ name: Deploy
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "master" ]
|
||||
branches: [ "master" ]
|
||||
release:
|
||||
types: [ published ]
|
||||
|
||||
|
@ -11,10 +11,6 @@ jobs:
|
|||
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 +18,17 @@ jobs:
|
|||
with:
|
||||
go-version: 1.21.1
|
||||
|
||||
- name: Build
|
||||
run: go build -ldflags "-s -w" -o ./build/sour.is-paste ./cmd/paste
|
||||
- name: Install
|
||||
run: go install -ldflags "-s -w" go.sour.is/paste/cmd/paste@latest
|
||||
|
||||
- run: mv $(go env GOPATH)/bin/paste sour.is-paste
|
||||
|
||||
- name: Compress
|
||||
uses: https://git.sour.is/actions/ghaction-upx@v2.4.0
|
||||
with:
|
||||
version: latest
|
||||
files: |
|
||||
./build/sour.is-paste
|
||||
./sour.is-paste
|
||||
args: -fq
|
||||
|
||||
- name: Deploy
|
||||
|
|
Loading…
Reference in New Issue
Block a user