Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload release binaries #364

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# The purpose of this workflow is to upload the bulwark binaries to a release.

name: "Upload Binaries to GitHub Release"

on:
release:
types: [created, published]

jobs:
publish-linux-binary:
if: github.repository == 'bulwark-security/bulwark'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
sporkmonger marked this conversation as resolved.
Show resolved Hide resolved
with:
toolchain: stable
components: clippy
target: wasm32-wasi

- name: Install protobuf compiler
run: /usr/bin/sudo /usr/bin/apt install -y protobuf-compiler

- name: Build release target
uses: clechasseur/rs-cargo@5cd564345ef5b1136392a1dc943b33a3a888b873 # v2.0.2
with:
command: build
args: --release

- name: Upload binary as release artifact
uses: Shopify/upload-to-release@c77c9b3e5d288adaef98a7007bf92340ec6ce03b # v2.0.0
with:
name: bulwark-cli.x86_64-unknown-linux-gnu
path: target/release/bulwark-cli
repo-token: ${{ github.token }}
content-type: application/octet-stream

publish-macos-x86-64-binary:
if: github.repository == 'bulwark-security/bulwark'
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
sporkmonger marked this conversation as resolved.
Show resolved Hide resolved
with:
toolchain: stable
components: clippy
target: wasm32-wasi
sporkmonger marked this conversation as resolved.
Show resolved Hide resolved

- name: Install protobuf compiler
run: /usr/bin/sudo /usr/bin/apt install -y protobuf-compiler

- name: Build release target
uses: clechasseur/rs-cargo@5cd564345ef5b1136392a1dc943b33a3a888b873 # v2.0.2
with:
command: build
args: --release --target=x86_64-apple-darwin

- name: Upload binary as release artifact
uses: Shopify/upload-to-release@c77c9b3e5d288adaef98a7007bf92340ec6ce03b # v2.0.0
with:
name: bulwark-cli.x86_64-apple-darwin
path: target/release/bulwark-cli
repo-token: ${{ github.token }}
content-type: application/octet-stream

publish-macos-aarch64-binary:
if: github.repository == 'bulwark-security/bulwark'
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: stable
components: clippy
target: wasm32-wasi

- name: Install protobuf compiler
run: /usr/bin/sudo /usr/bin/apt install -y protobuf-compiler

- name: Build release target
uses: clechasseur/rs-cargo@5cd564345ef5b1136392a1dc943b33a3a888b873 # v2.0.2
with:
command: build
args: --release --target=aarch64-apple-darwin

- name: Upload binary as release artifact
uses: Shopify/upload-to-release@c77c9b3e5d288adaef98a7007bf92340ec6ce03b # v2.0.0
with:
name: bulwark-cli.aarch64-apple-darwin
path: target/release/bulwark-cli
repo-token: ${{ github.token }}
content-type: application/octet-stream