Skip to content

Commit 2c63a5f

Browse files
author
Alex Florenti
committed
test with script
1 parent 5abe080 commit 2c63a5f

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,30 @@ jobs:
77
env:
88
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
99
steps:
10-
- name: Settalo
11-
run: echo $UPLOAD_KEY > test.txt
12-
- name: Gettalo
13-
run: cat test.txt | sed 's/./& /g'
10+
- uses: actions/checkout@v4
11+
- run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
12+
- run: wget -q https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
13+
- run: sudo tar -xf go1.13.4.linux-amd64.tar.gz
14+
- run: sudo mv go /usr/local
15+
- run: echo "GOPATH=$HOME/go" >> $GITHUB_ENV
16+
- run: echo "GOROOT=/usr/local/go" >> $GITHUB_ENV
17+
- run: echo "PATH=$GOPATH/bin:$GOROOT/bin:$PATH" >> $GITHUB_ENV
18+
- run: mkdir -p $HOME/go/src
19+
- run: mkdir -p $HOME/go/bin
20+
- run: go get "github.com/gobuffalo/packr/v2/packr2"
21+
id: prepare_backend
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: '16.x'
25+
- run: cd webmanager && npm install && npm run-script build-prod && cd ..
26+
id: build_frontend
27+
- run: make
28+
id: build_backend
29+
if: ${{ success() }}
30+
- name: Upload artifacts
31+
id: upload
32+
env:
33+
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
34+
UPLOAD_URL: ${{ vars.UPLOAD_URL }}
35+
if: ${{ success() }}
36+
run: cd dist && find * -type f -exec ./scripts/upload-builds.sh

scripts/upload-builds.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
echo 'Uploading @{}' \; -exec curl -4 -F 'file=@{}' -F "path=$branch/{}" -F "key=$UPLOAD_KEY" "$UPLOAD_URL" \;;

0 commit comments

Comments
 (0)