Skip to content

Commit 14bf6c2

Browse files
committed
bug fix: move .github back to root path
Since github treat soft link as a file. It will not kick the github actions.
1 parent db35f2c commit 14bf6c2

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

.github

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: 1.16
18+
19+
- name: Install ninja-build
20+
run: sudo apt install ninja-build -y
21+
22+
- name: Install upx
23+
run: sudo apt install upx -y
24+
25+
- name: Install rpm
26+
run: sudo apt install rpm -y
27+
28+
- name: build elf
29+
run: ninja -j 0
30+
31+
- name: build rpm
32+
run: ninja -j 0 rpm-amd64
33+
34+
- name: Release
35+
uses: softprops/action-gh-release@v1
36+
with:
37+
tag_name: latest${{steps.version.outputs.value}}
38+
files: |
39+
out/gopic-linux-amd64
40+
out/gopic-linux-arm64
41+
out/gopic-mac-amd64
42+
out/gopic.exe
43+
out/x86_64/gopic-0.0.1-1.x86_64.rpm
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.ninja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ rule unit
2020
build utest: unit
2121

2222
rule compile
23-
command = go mod tidy && $GOFLAGS go build $LDFLAGS $GCFLAGS -a -o $OUTPUT/$out $in && upx -9 $OUTPUT/$out && echo "$out build done."
23+
command = go mod tidy && $GOFLAGS go build $LDFLAGS $GCFLAGS -a -o $OUTPUT/$out $in && echo "$out build done." #&& upx -9 $OUTPUT/$out
2424
description = compile %in
2525

2626
build gopic: compile .
@@ -47,6 +47,6 @@ build rpm-amd64: rpm-build gopic-linux-amd64
4747
build rpm-arm64: rpm-build gopic-linux-arm64
4848
TARGET = armv8l-linux
4949

50-
build all: phony gopic-linux-amd64 gopic-linux-arm64 gopic-mac-amd64 gopic.exe lintoutput
50+
build all: phony gopic-linux-amd64 gopic-linux-arm64 gopic-mac-amd64 gopic.exe
5151

5252
default all

0 commit comments

Comments
 (0)