Skip to content

Commit

Permalink
add action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
xiak committed Dec 19, 2023
1 parent 807cf67 commit a4c7658
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and release

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build All
run: make build-all

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./bin/ddcli*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.PHONY: init
# init environment
init:
go mod tidy

.PHONY: build-linux
# build linux binary
build-linux:
Expand All @@ -16,6 +21,7 @@ build-windows:
.PHONY: build-all
# build all
build-all:
make init
make build-linux;
make build-darwin;
make build-windows;
Expand Down

0 comments on commit a4c7658

Please sign in to comment.