Skip to content

Commit

Permalink
Merge pull request #4 from daido1976/linux-support
Browse files Browse the repository at this point in the history
Linux support
  • Loading branch information
daido1976 authored Mar 11, 2022
2 parents 4effd36 + 01fe02f commit 39f4cd3
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 33 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cli/gh-extension-precompile@v1
with:
build_script_override: "./scripts/build.sh"
release-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: bash ./scripts/build.sh
- name: Upload release artifact
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
files: dist/darwin-amd64
19 changes: 0 additions & 19 deletions gh-default-branch

This file was deleted.

14 changes: 0 additions & 14 deletions release.sh

This file was deleted.

15 changes: 15 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

cargo build --release --locked
mkdir -p ./dist

case "$OSTYPE" in
darwin*)
EXECUTABLE=darwin-amd64
;;
*)
EXECUTABLE=linux-amd64
;;
esac

mv target/release/gh-report "./dist/$EXECUTABLE"

0 comments on commit 39f4cd3

Please sign in to comment.