2024-09-20 12:47:38 +02:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: docker
|
|
|
|
steps:
|
2024-12-05 21:33:16 +01:00
|
|
|
# Step 1: Check out the code
|
2024-12-05 21:34:36 +01:00
|
|
|
- uses: actions/checkout@v3
|
2024-12-05 21:33:16 +01:00
|
|
|
|
2024-12-05 21:40:47 +01:00
|
|
|
# Step 2: Set up go environment
|
2024-12-05 21:43:09 +01:00
|
|
|
- uses: actions/setup-go@v4
|
2024-12-05 21:40:47 +01:00
|
|
|
with:
|
2024-12-05 21:46:13 +01:00
|
|
|
go-version-file: '/workspace/ScheduleTogether/Backend/go.mod'
|
2024-12-05 21:40:47 +01:00
|
|
|
|
|
|
|
# Step 3: Set the working directory and build the project
|
2024-12-05 21:23:15 +01:00
|
|
|
- run: go build -x -v -o=stbackend -buildvcs=true ./cmd/stbackend/main.go
|
2024-12-05 21:48:05 +01:00
|
|
|
working-directory: /workspace/ScheduleTogether/Backend
|
2024-12-05 21:23:15 +01:00
|
|
|
|
2024-12-05 21:40:47 +01:00
|
|
|
# Step 4: Upload the build artifact
|
2024-09-20 12:47:38 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: build-artifact
|
2024-12-05 21:33:16 +01:00
|
|
|
path: ./Backend/stbackend
|