11name : Publish binaries on Release
2- on :
2+ on :
33 release :
44 types : [created]
55
88 name : Build
99 runs-on : ubuntu-22.04
1010 steps :
11+ - name : Check out code into the Go module directory
12+ uses : actions/checkout@v4
1113
12- - name : Check out code into the Go module directory
13- uses : actions/checkout@v4
14+ - name : Get dependencies
15+ run : |
16+ docker build -t myrepo:latest -f Dockerfile-release .
17+ id=$(docker create myrepo:latest)
18+ docker cp $id:/tmp/dnsmonster-linux-amd64.bin /tmp/dnsmonster-linux-amd64.bin
19+ docker cp $id:/tmp/dnsmonster-windows-amd64.exe /tmp/dnsmonster-windows-amd64.exe
20+ docker cp $id:/tmp/dnsmonster-latest.rpm /tmp/dnsmonster-latest.rpm
21+ docker cp $id:/tmp/dnsmonster-latest.deb /tmp/dnsmonster-latest.deb
22+ strip --strip-all /tmp/dnsmonster-linux-amd64.bin
23+ tar czf /tmp/dnsmonster-linux-amd64.bin.tar.gz -C /tmp/ dnsmonster-linux-amd64.bin
1424
15- - name : Get dependencies
16- run : |
17- docker build -t myrepo:latest -f Dockerfile-release .
18- id=$(docker create myrepo:latest)
19- docker cp $id:/tmp/dnsmonster-linux-amd64.bin /tmp/dnsmonster-linux-amd64.bin
20- docker cp $id:/tmp/dnsmonster-windows-amd64.exe /tmp/dnsmonster-windows-amd64.exe
21- docker cp $id:/tmp/dnsmonster-latest.rpm /tmp/dnsmonster-latest.rpm
22- docker cp $id:/tmp/dnsmonster-latest.deb /tmp/dnsmonster-latest.deb
23- strip --strip-all /tmp/dnsmonster-linux-amd64.bin
24- tar czf /tmp/dnsmonster-linux-amd64.bin.tar.gz -C /tmp/ dnsmonster-linux-amd64.bin
25+ - name : Upload Linux binary to release
26+ uses : svenstaro/upload-release-action@v2
27+ with :
28+ repo_token : ${{ secrets.GITHUB_TOKEN }}
29+ file : /tmp/dnsmonster-linux-amd64.bin.tar.gz
30+ asset_name : dnsmonster-musl-static-stripped-amd64.tar.gz
31+ tag : ${{ github.ref }}
32+ overwrite : true
33+ body : " "
2534
26- - name : Upload Linux binary to release
27- uses : svenstaro/upload-release-action@v2
28- with :
29- repo_token : ${{ secrets.GITHUB_TOKEN }}
30- file : /tmp/dnsmonster-linux -amd64.bin.tar.gz
31- asset_name : dnsmonster-musl-static-stripped- amd64.tar.gz
32- tag : ${{ github.ref }}
33- overwrite : true
34- body : " "
35+ - name : Upload windows binary to release
36+ uses : svenstaro/upload-release-action@v2
37+ with :
38+ repo_token : ${{ secrets.GITHUB_TOKEN }}
39+ file : /tmp/dnsmonster-windows -amd64.exe
40+ asset_name : dnsmonster-windows- amd64.exe
41+ tag : ${{ github.ref }}
42+ overwrite : true
43+ body : " "
3544
36- - name : Upload windows binary to release
37- uses : svenstaro/upload-release-action@v2
38- with :
39- repo_token : ${{ secrets.GITHUB_TOKEN }}
40- file : /tmp/dnsmonster-windows-amd64.exe
41- asset_name : dnsmonster-windows-amd64.exe
42- tag : ${{ github.ref }}
43- overwrite : true
44- body : " "
45+ - name : Upload rpm to release
46+ uses : svenstaro/upload-release-action@v2
47+ with :
48+ repo_token : ${{ secrets.GITHUB_TOKEN }}
49+ file : /tmp/dnsmonster-latest.rpm
50+ asset_name : dnsmonster-centos-rhel-ami-x86_64.rpm
51+ tag : ${{ github.ref }}
52+ overwrite : true
53+ body : " "
4554
46- - name : Upload rpm to release
47- uses : svenstaro/upload-release-action@v2
48- with :
49- repo_token : ${{ secrets.GITHUB_TOKEN }}
50- file : /tmp/dnsmonster-latest.rpm
51- asset_name : dnsmonster-centos-rhel-ami-x86_64.rpm
52- tag : ${{ github.ref }}
53- overwrite : true
54- body : " "
55-
56- - name : Upload deb to release
57- uses : svenstaro/upload-release-action@v2
58- with :
59- repo_token : ${{ secrets.GITHUB_TOKEN }}
60- file : /tmp/dnsmonster-latest.deb
61- asset_name : dnsmonster-debian-ubuntu-x86_64.deb
62- tag : ${{ github.ref }}
63- overwrite : true
64- body : " "
55+ - name : Upload deb to release
56+ uses : svenstaro/upload-release-action@v2
57+ with :
58+ repo_token : ${{ secrets.GITHUB_TOKEN }}
59+ file : /tmp/dnsmonster-latest.deb
60+ asset_name : dnsmonster-debian-ubuntu-x86_64.deb
61+ tag : ${{ github.ref }}
62+ overwrite : true
63+ body : " "
6564
6665 # - uses: actions/upload-artifact@v2
6766 # with:
6867 # name: dnsmonster-latest.deb
69- # path: /tmp/dnsmonster*.deb
68+ # path: /tmp/dnsmonster*.deb
0 commit comments