Skip to content

Instantly share code, notes, and snippets.

@skanehira
Created March 4, 2020 01:59
Show Gist options
  • Save skanehira/651a20b3e53b60a2856584fc3369c72e to your computer and use it in GitHub Desktop.
Save skanehira/651a20b3e53b60a2856584fc3369c72e to your computer and use it in GitHub Desktop.

mattnさんから教えてもらったgithub-flowsのやつ

  1. Makefile と .github/workflows をコピる。
  2. Makefile の BIN と VERSION_PATH を書き換える(必要があれば)
  3. main に -v 等でバージョンを吐くコードを足す。これは mmv の main.go を参考に

あとは全部 push。git tag vX.X.X したらクロスコンパイルされたバイナリが GitHub Release にアップロードされる。 https://github.com/itchyny/mmv/blob/master/Makefile

手元では 123ci.bat というバッチコマンドを用意しています。

@echo off
mkdir .github\workflows
curl -o Makefile -s https://raw.githubusercontent.com/itchyny/mmv/master/Makefile
curl -o .github/workflows/ci.yaml -s https://raw.githubusercontent.com/itchyny/mmv/master/.github/workflows/ci.yaml
curl -o .github/workflows/release.yaml -s https://raw.githubusercontent.com/itchyny/mmv/master/.github/workflows/release.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment