Skip to content

Commit

Permalink
feat: add release with building to ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
parnexcodes committed Oct 18, 2024
1 parent 4ad96fd commit 9646735
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Nimbus
name: Build and Release Nimbus

on:
push:
Expand All @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
Expand All @@ -31,14 +31,33 @@ jobs:
chmod +x build.sh
./build.sh
- name: Upload Linux build
uses: actions/upload-artifact@v3
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: nimbus-linux
path: builds/nimbus-linux

- name: Upload Windows build
uses: actions/upload-artifact@v3
tag_name: v${{ github.run_number }}
release_name: Release ${{ github.run_number }}
draft: false
prerelease: false

- name: Upload Linux Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./builds/nimbus-linux
asset_name: nimbus-linux
asset_content_type: application/octet-stream

- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: nimbus-windows
path: builds/nimbus-windows.exe
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./builds/nimbus-windows.exe
asset_name: nimbus-windows.exe
asset_content_type: application/octet-stream

0 comments on commit 9646735

Please sign in to comment.