Skip to content

Commit

Permalink
Merge pull request #139 from askgitdev/release-github-action
Browse files Browse the repository at this point in the history
GitHub action to push macos and linux binaries on new `v*` releases
  • Loading branch information
patrickdevivo authored Jul 26, 2021
2 parents 08b310a + 2ad65df commit 32ba86d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tests
name: Tests
on: [push, pull_request]
jobs:
build:
Expand Down

0 comments on commit 32ba86d

Please sign in to comment.