Skip to content

Commit d35499c

Browse files
committed
gh-action: m refactor
1 parent f1674c4 commit d35499c

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

.github/workflows/go.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ on:
1010
jobs:
1111

1212
build:
13-
name: Build
13+
name: Build 🧬
1414
runs-on: ubuntu-latest
1515
steps:
1616

17-
- name: Checkout
17+
- name: Checkout code 🥏
1818
uses: actions/checkout@v3
1919

2020
- name: Setup go1.22+
2121
uses: actions/setup-go@v4
2222
with:
2323
go-version: '>=1.22'
2424

25-
- name: Build
25+
- name: 🏗️ Make
2626
run: |
2727
# outputs firestack.aar and firestack-arm.aar; also see: "Obj" below
2828
./make-aar nogo debug
2929
shell: bash
3030

31-
- name: Test
31+
- name: 🧪 Test
3232
if: success()
3333
run: |
3434
go env
3535
# go test -v -race -bench=. -benchtime=100ms ./...
3636
echo "::notice::success"
3737
38-
- name: Vet
38+
- name: 🧹 Vet
3939
run: |
4040
# github.com/actions/setup-go/issues/27
4141
export PATH=${PATH}:`go env GOPATH`/bin
@@ -47,49 +47,51 @@ jobs:
4747
nilaway ./...
4848
shell: bash
4949

50-
- name: Obj
50+
- name: 💿 Obj
5151
run: |
5252
wget --tries=2 --waitretry=3 --no-dns-cache https://github.com/Zxilly/go-size-analyzer/releases/download/v1.0.8/go-size-analyzer_1.0.8_linux_amd64.deb -O gsa.deb
5353
sudo dpkg -i gsa.deb
54-
# s/tun2socks.aar/firestack.aar; see: make-aar
55-
unzip firestack-arm.aar
54+
# s/tun2socks*.aar/firestack*.aar; see: make-aar
55+
unzip firestack-debug.aar
5656
gsa jni/arm64-v8a/*.so -f text --verbose
5757
shell: bash
5858

5959
# github.com/actions/upload-artifact
60-
- name: Upload artifacts
61-
uses: actions/upload-artifact@v3
60+
- name: 🚀 Upload
61+
uses: actions/upload-artifact@v4
6262
if: success()
6363
with:
64-
name: firestack-aar-${{ github.sha }}
65-
path: firestack.aar
66-
if-no-files-found: error
64+
name: firestack-aar-${{ github.sha }} # must be unique
65+
path: firestack*.aar # see: make-aar
66+
retention-days: 52 # 0-90; 90 is max
67+
if-no-files-found: error # error, warn (default), ignore
68+
compression-level: 9 # 0-9; 9 is max
6769

6870
checker:
69-
name: Security checker
71+
name: 🔐 Security checker
7072
runs-on: ubuntu-latest
7173
permissions:
7274
security-events: write
7375
id-token: write
7476
env:
7577
GO111MODULE: on
7678
steps:
77-
- name: "Checkout code"
78-
uses: actions/checkout@v3
79+
- name: 🥏 Checkout
80+
uses: actions/checkout@v4
7981

80-
- name: Gosec Scanner
82+
- name: 🕵️ Gosec Scanner
8183
uses: securego/gosec@master
8284
with:
8385
# we let the report trigger content trigger a failure using the GitHub Security features.
8486
args: '-no-fail -fmt sarif -out results.sarif ./...'
85-
- name: "Upload to code-scanning"
87+
- name: 📡 Upload to code-scanning
8688
uses: github/codeql-action/upload-sarif@v3
8789
with:
8890
sarif_file: results.sarif
8991

9092
# from: github.com/golangci/golangci-lint-action
9193
golangci-lint:
92-
name: Linter
94+
name: 🧭 Lint
9395
runs-on: ubuntu-latest
9496
permissions:
9597
# Required: allow read access to the content for analysis.
@@ -99,14 +101,14 @@ jobs:
99101
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
100102
checks: write
101103
steps:
102-
- name: "Checkout code"
103-
uses: actions/checkout@v3
104-
- name: Set up Go
104+
- name: 🥏 Checkout
105+
uses: actions/checkout@v4
106+
- name: 🐼 Set up Go
105107
uses: actions/setup-go@v4
106108
with:
107109
go-version: '>=1.22'
108110
cache: false
109-
- name: Lint
111+
- name: 🏅 Lint
110112
uses: golangci/golangci-lint-action@v3.7.0
111113
with:
112114
args: --config=.golangci.yml --issues-exit-code=0

0 commit comments

Comments
 (0)