Skip to content

Commit

Permalink
ci: optimize fetching and add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie0129 committed Sep 26, 2023
1 parent 2a124d7 commit 8fa7f5d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-test-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build
run: make build-darwin_arm64
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Binary

on:
push:
tags:
- "v*"
workflow_dispatch: {}

permissions:
contents: write

jobs:
build:
name: Release Binary
runs-on: macos-12
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build
run: make package-darwin_arm64

- name: Attach Binaries to Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') }}
files: |
bin/batt-packages-latest/*

0 comments on commit 8fa7f5d

Please sign in to comment.