Skip to content

Merge pull request #28 from Dodai-Dodai/no-fifference-commit #6

Merge pull request #28 from Dodai-Dodai/no-fifference-commit

Merge pull request #28 from Dodai-Dodai/no-fifference-commit #6

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.21' # 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 --allow-empty -m "Add executable" || echo "No changes to commit"
git push origin exec