File tree Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ name: "CodeQL"
13
13
14
14
on :
15
15
push :
16
- branches : [ main ]
16
+ # branches: [ main ]
17
17
paths-ignore :
18
18
- ' **/*.md'
19
19
pull_request :
20
20
# The branches below must be a subset of the branches above
21
- branches : [ main ]
21
+ # branches: [ main ]
22
22
paths-ignore :
23
23
- ' **/*.md'
24
24
schedule :
Original file line number Diff line number Diff line change 7
7
tags :
8
8
- ' v*'
9
9
10
+ env :
11
+ GO111MODULE : off
12
+
10
13
jobs :
11
14
build :
12
15
runs-on : ubuntu-latest
15
18
name : Set up Go
16
19
uses : actions/setup-go@v2
17
20
with :
18
- go-version : 1.15
21
+ go-version : 1.16
22
+
23
+ -
24
+ name : Install Cloudsmith CLI
25
+ run : pip install --upgrade cloudsmith-cli
26
+ # Cloudsmith CLI tooling for pushing releases
27
+ # See https://help.cloudsmith.io/docs/cli
19
28
20
29
-
21
30
name : Checkout
43
52
args : release --rm-dist
44
53
env :
45
54
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
+
56
+ # Publish to cloudsmith repo
57
+ -
58
+ name : Publish package to cloudsmith
59
+ if : success() && startsWith(github.ref, 'refs/tags/')
60
+ env :
61
+ CLOUDSMITH_API_KEY : ${{ secrets.CLOUDSMITH_API_KEY }}
62
+ run : |
63
+ for filepath in dist/*; do
64
+ echo "== Analyzing '$filepath' for publishing"
65
+ filename=$(basename -- "$filepath")
66
+ extension="${filename##*.}"
67
+ filename="${filename%.*}"
68
+ case "$extension" in
69
+ 'apk')
70
+ echo "Pushing '$filepath' to cloudsmith repo"
71
+ cloudsmith push alpine suntong/repo/alpine/any-version $filepath
72
+ ;;
73
+ 'deb' | 'rpm')
74
+ echo "Pushing '$filepath' to cloudsmith repo"
75
+ cloudsmith push $extension suntong/repo/any-distro/any-version $filepath
76
+ ;;
77
+ *)
78
+ echo "File .$extension skipped publishing"
79
+ echo
80
+ ;;
81
+ esac
82
+ done
You can’t perform that action at this time.
0 commit comments