@@ -46,10 +46,10 @@ jobs:
4646 GOAMD64 : ${{ matrix.goamd64 }}
4747 CGO_ENABLED : 0
4848 steps :
49- - name : Checkout codebase
49+ - name : Checkout
5050 uses : actions/checkout@v4
5151
52- - name : Configure & show workflow information
52+ - name : Generate build information
5353 id : get_filename
5454 run : |
5555 echo "BUILD_TAG: $BUILD_TAG, GOOS: $GOOS, GOARCH: $GOARCH, GOAMD64: $GOAMD64"
@@ -81,50 +81,41 @@ jobs:
8181
8282 - name : Build netstatus-api-go
8383 run : |
84- mkdir -p build_assets
84+ mkdir build_assets
8585 if [ $BUILD_TAG != "none" ]; then
8686 go build -v -o build_assets/netstatus-api-go -trimpath -ldflags "-s -w -buildid=" -tags $BUILD_TAG
8787 else
8888 go build -v -o build_assets/netstatus-api-go -trimpath -ldflags "-s -w -buildid="
8989 fi
9090
91- - name : Prepare to release
92- uses : nick-fields/retry@v3
93- with :
94- timeout_minutes : 60
95- retry_wait_seconds : 60
96- max_attempts : 5
97- command : |
98- cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
99- cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
100- cp ${GITHUB_WORKSPACE}/config.json.example ./build_assets/config.json
91+ - name : Prepare config files
92+ run : |
93+ cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
94+ cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
95+ cp ${GITHUB_WORKSPACE}/config.json.example ./build_assets/config.json
10196
102- - name : Create ZIP archive
103- shell : bash
97+ - name : Create zip archive
10498 run : |
10599 pushd build_assets || exit 1
106100 touch -mt $(date +%Y01010000) *
107101 zip -9vr ../netstatus-api-go-$ASSET_NAME.zip .
108102 popd || exit 1
109103 FILE=./netstatus-api-go-$ASSET_NAME.zip
110- DGST=$FILE.dgst
111- openssl dgst -sha256 $FILE | sed 's/([^)]*)//g' >>$DGST
112- openssl dgst -sha3-256 $FILE | sed 's/([^)]*)//g' >>$DGST
113-
114- - name : Change the name
115- run : |
104+ DGST=$FILE.hash.txt
105+ openssl dgst -sha256 $FILE | sed 's/([^)]*)//g' >> $DGST
106+ openssl dgst -sha3-256 $FILE | sed 's/([^)]*)//g' >> $DGST
116107 mv build_assets netstatus-api-go-$ASSET_NAME
117108
118- - name : Upload files to Artifacts
109+ - name : Upload files to artifacts
119110 uses : actions/upload-artifact@v4
120111 with :
121112 name : netstatus-api-go-${{ steps.get_filename.outputs.ASSET_NAME }}
122113 path : |
123114 ./netstatus-api-go-${{ steps.get_filename.outputs.ASSET_NAME }}/*
124115
125- - name : Upload binaries to release
116+ - name : Upload files to release
126117 uses : svenstaro/upload-release-action@v2
127- if : github.event_name == 'release'
118+ if : ${{ github.event_name == 'release' }}
128119 with :
129120 repo_token : ${{ secrets.GITHUB_TOKEN }}
130121 file : ./netstatus-api-go-${{ steps.get_filename.outputs.ASSET_NAME }}.zip*
0 commit comments