-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.1 KB
/
release-csp-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release CSP Application
on:
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
make_binaries:
name: Build on ubuntu
runs-on: ubuntu-latest
steps:
- name: Check out code into the directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "middleware/go.mod"
cache: true
check-latest: true
id: go
- name: Build the Application.
run: sudo bash middleware/go-build-script.sh
- name: Create a release using the github CLI.
run: gh release create v0.0.1
- name: Upload all the files to github.
run: |
ALL_FILES_IN_DIRECTORY=$(find middleware/binaries/ -type f)
for CURRENT_FILE_IN_DIRECTORY in ${ALL_FILES_IN_DIRECTORY}; do
ALL_FILES_LIST[${ADD_CONTENT}]=${CURRENT_FILE_IN_DIRECTORY}
ADD_CONTENT=$(("${ADD_CONTENT}" + 1))
done
for FILE_LIST in "${ALL_FILES_LIST[@]}"; do
echo ${FILE_LIST}
gh release upload v0.0.1 ${FILE_LIST}
done