Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update xbuild #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 41 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@ on:
- 'v*'
jobs:
build:
name: build-mac
name: build-mac-darwin
env:
GO111MODULE: "on"
runs-on: macos-latest
runs-on: ubuntu-latest
strategy:
matrix:
build-arch: ['amd64', 'arm64']

steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Set up Go
uses: actions/setup-go@v2

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: install deps
run: go mod tidy

- name: Build
run: make build dotz_ver=${{ github.ref }}
run: make build dotz_ver=${{ github.ref }} -o dotz-darwin-${{ matrix.build-arch }}
env:
GOOS: 'darwin'
GOARCH: ${{ matrix.build-arch }}

- name: create release
id: create_release
Expand All @@ -32,7 +39,6 @@ jobs:
release_name: Release ${{ github.ref }}
body: |
Release ${{ github.ref }}
revision ${{ github.revision }}
draft: false
prerelease: false

Expand All @@ -43,35 +49,34 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dotz
asset_name: dotz
asset_name: dotz-darwin-${{ matrix.build-arch }}
asset_content_type: application/octet-stream

- name: update homebrew formula
id: update_homebrew_formula
uses: ./.github/actions/update_homebrew
with:
formula_url: 'https://github.com/magcho/homebrew-magcho'
formula_file_name: 'dotz.rb'
asset_path: ./dotz
tag_name: ${{ github.ref }}
revision: ${{ github.sha }}
# - name: update homebrew formula
# id: update_homebrew_formula
# uses: ./.github/actions/update_homebrew
# with:
# formula_url: 'https://github.com/magcho/homebrew-magcho'
# formula_file_name: 'dotz.rb'
# asset_path: ./dotz
# tag_name: ${{ github.ref }}
# revision: ${{ github.sha }}

- name: upload formula recipe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dotz.rb
asset_name: dotz.rb
asset_content_type: application/octet-stream
# - name: upload formula recipe
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: dotz.rb
# asset_name: dotz.rb
# asset_content_type: application/octet-stream

- name: homebrew formula test
id: homebrew_test
run: |
sh ./ci/homebrew_test.sh "magcho" "dotz.rb"
# - name: homebrew formula test
# id: homebrew_test
# run: |
# sh ./ci/homebrew_test.sh "magcho" "dotz.rb"

- name: create commit
run: |
sh ./ci/create_commit.sh "dotz.rb" "magcho" "${{ secrets.github_personal_acces_token }}" "[email protected]"

# - name: create commit
# run: |
# sh ./ci/create_commit.sh "dotz.rb" "magcho" "${{ secrets.github_personal_acces_token }}" "[email protected]"
4 changes: 1 addition & 3 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/urfave/cli v1.21.0 h1:wYSSj06510qPIzGSua9ZqsncMmWE3Zr55KBERygyrxE=
github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ=
github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down