Skip to content

Merge pull request #6 from masx200/dependabot/go_modules/github.com/t… #23

Merge pull request #6 from masx200/dependabot/go_modules/github.com/t…

Merge pull request #6 from masx200/dependabot/go_modules/github.com/t… #23

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.6
cache: true
- name: Build bundle
run: |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -v -ldflags="-w -s" -o ./dist/linux-amd64/reverse-proxy-server ./main.go
cd ./dist/linux-amd64/
tar zcvf ../../dist/reverse-proxy-server-linux-amd64.tgz ./reverse-proxy-server
cd ../../
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -v -ldflags="-w -s" -o ./dist/linux-amd64/doh3_debugger ./doh3_debugger/doh3_debugger.go
cd ./dist/linux-amd64/
tar zcvf ../../dist/doh3_debugger-linux-amd64.tgz ./doh3_debugger
cd ../../
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -v -ldflags="-w -s" -o ./dist/linux-amd64/doh_debugger ./doh_debugger/doh_debugger.go
cd ./dist/linux-amd64/
tar zcvf ../../dist/doh_debugger-linux-amd64.tgz ./doh_debugger
cd ../../
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/heads/master')
with:
tag_name: Continuous-integration-${{ github.sha }}
#token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
files: |
dist/*.tgz