Skip to content

Fix commit step in actions #6

Fix commit step in actions

Fix commit step in actions #6

Workflow file for this run

name: Go
on:
push:
branches: [ maestro ]
pull_request:
branches: [ maestro ]
jobs:
build:
if: github.actor != 'github-actions[bot]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ['1.18']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- name: Check Out Code
uses: actions/checkout@v2
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Download Go modules
run: go get -v -t -d ./...
- name: Run Tests
run: go test
- name: Build
if: startsWith(matrix.os, 'ubuntu')
run: go build -v -o ./bin/hsa
- name: Build
if: startsWith(matrix.os, 'macos')
run: go build -v -o ./bin/hsamac
- name: Build
if: startsWith(matrix.os, 'windows')
run: go build -v -o ./bin/hsa.exe
- name: Commit and Push Binaries (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git pull origin maestro
git add ./bin/hsa
git commit -m "Add Ubuntu built binary [skip ci]"
git push
- name: Commit and Push Binaries (MacOS)
if: startsWith(matrix.os, 'macos')
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git pull origin maestro
git add ./bin/hsamac
git commit -m "Add MacOS built binary [skip ci]"
git push
- name: Commit and Push Binaries (Windows)
if: startsWith(matrix.os, 'windows')
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git pull origin maestro
git add ./bin/hsa.exe
git commit -m "Add Windows built binary [skip ci]"
git push