Skip to content

Merge pull request #24 from Dodai-Dodai/buildWithoutDocker #1

Merge pull request #24 from Dodai-Dodai/buildWithoutDocker

Merge pull request #24 from Dodai-Dodai/buildWithoutDocker #1

name: Build and Push Executable
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.18' # Goのバージョンを指定
- name: Build executable
run: go build -o main .
- name: Configure Git
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Check out the exec branch
run: git checkout -b exec || git checkout exec
- name: Add executable
run: |
git add main
git commit -m "Add executable" || echo "No changes to commit"
git push origin exec