Skip to content

Commit

Permalink
githu action 4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
grooviegermanikus committed Jul 28, 2023
1 parent e8f2bef commit f062cbf
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Release Binaries and Create GitHub Release
on:
push:
tags:
- 'v*'

env:
APP_NAME: lite-rpc

jobs:
build:
name: Build Binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build Release
run: |
cargo build --release
- name: Generate Checksum
run: |
echo "CHECKSUM=$(sha256sum ./target/release/${{ env.APP_NAME }} | head -c 64)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: |
sha256 checksum: ${{ env.CHECKSUM }}
github commit: ${{ github.sha }}
files: |
./target/release/${{ env.APP_NAME }}
19 changes: 18 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

env:
CARGO_TERM_COLOR: always
APP_NAME: lite-rpc

jobs:
build_and_test:
Expand All @@ -24,7 +25,23 @@ jobs:
sudo apt-get install libssl-dev openssl -y
- name: Early Build
run: cargo build --workspace --tests
run: cargo build --workspace --release --tests

- name: Generate Checksum
run: |
echo "CHECKSUM=$(sha256sum ./target/release/${{ env.APP_NAME }} | head -c 64)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: |
sha256 checksum: ${{ env.CHECKSUM }}
github commit: ${{ github.sha }}
files: |
./target/release/${{ env.APP_NAME }}
- name: Install node deps
run: yarn
Expand Down

0 comments on commit f062cbf

Please sign in to comment.