Go Build #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: # Возможность ручного запуска | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Build | |
run: | | |
echo "Creating build directory..." | |
mkdir -p build | |
echo "Building dnstt-client..." | |
go build -o build/dnstt-client.exe ./dnstt-client | |
echo "Building dnstt-server..." | |
go build -o build/dnstt-server.exe ./dnstt-server | |
echo "Contents of the build directory:" | |
ls -la build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dnstt-binaries-${{ github.run_id }} # Уникальное имя артефакта | |
path: build/* | |
if-no-files-found: warn | |
compression-level: 6 | |
overwrite: false | |
- name: Debug directories | |
run: | | |
echo "=== Current working directory ===" | |
pwd | |
echo "=== Contents of the repository root ===" | |
ls -la | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dnstt-binaries | |
path: build/* |