Skip to content

Commit

Permalink
ci: added workflows to generate releases
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahBull committed Sep 2, 2022
1 parent f372d21 commit 6ae30a4
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ coverage:
default:
target: 60%
threshold: 5%
informational: true
project:
default:
target: 60%
threshold: 5%
informational: true
37 changes: 37 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: pre-release

on:
push:
branches:
- main

jobs:
pre-release:
name: "Pre Release"
runs-on: "ubuntu-latest"

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install protoc
run: wget https://github.com/protocolbuffers/protobuf/releases/download/v3.20.0/protoc-3.20.0-linux-x86_64.zip &&
unzip protoc-3.20.0-linux-x86_64.zip &&
sudo cp -r include/* /usr/local/include &&
sudo cp bin/protoc /usr/bin/

- name: Build Project
run: cargo build --release

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "latest"
title: "Dev Build"
files: |
license
readme.md
target/release/cli
target/release/agent
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: release

on:
push:
tags:
- "v*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install protoc
run: wget https://github.com/protocolbuffers/protobuf/releases/download/v3.20.0/protoc-3.20.0-linux-x86_64.zip &&
unzip protoc-3.20.0-linux-x86_64.zip &&
sudo cp -r include/* /usr/local/include &&
sudo cp bin/protoc /usr/bin/

- name: Build Project
run: cargo build --release

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
license
readme.md
target/release/cli
target/release/agent

0 comments on commit 6ae30a4

Please sign in to comment.