-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from askgitdev/release-github-action
GitHub action to push macos and linux binaries on new `v*` releases
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
publish: | ||
name: Publish for ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
asset_name: askgit-linux-amd64 | ||
# - os: windows-latest | ||
# asset_name: askgit-windows-amd64 | ||
- os: macos-latest | ||
asset_name: askgit-macos-amd64 | ||
|
||
steps: | ||
- name: Set up Go 1.15 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.15.5 | ||
id: go | ||
|
||
- name: Check out source | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install libgit2 | ||
run: sudo ./scripts/install_libgit2.sh | ||
|
||
- name: Build | ||
run: make | ||
|
||
- name: Compress | ||
run: tar -czvf askgit.tar.gz -C .build/ . | ||
|
||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: askgit.tar.gz | ||
asset_name: ${{ matrix.asset_name }}.tar.gz | ||
tag: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: tests | ||
name: Tests | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
|