Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Frederick committed Jan 9, 2024
1 parent f8ea4bb commit ca51756
Show file tree
Hide file tree
Showing 39 changed files with 1,787 additions and 938 deletions.
88 changes: 0 additions & 88 deletions .env.example

This file was deleted.

99 changes: 23 additions & 76 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,30 @@
name: ci

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Rust CI - Create Release
branches:
- 'dev'

jobs:
check:
name: Create Release
runs-on: ubuntu-20.04
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Rust latest stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Run cargo test
uses: actions-rs/cargo@v1
env:
CRUNCH_CONFIG_FILENAME: .env.example
with:
command: test

- name: Run cargo build
uses: actions-rs/cargo@v1
env:
CRUNCH_CONFIG_FILENAME: .env.example
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
command: build
args: --release

- name: Generate SHA-256 hash file
run: |
cd ./target/release
sha256sum crunch > crunch.sha256
- name: Get Rustc version
id: get_rustc
run: echo ::set-output name=rustc::$(rustc -V)

- name: Get Tag version
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_tag.outputs.tag }}
release_name: Crunch ${{ steps.get_tag.outputs.tag }}
body: "Note: This release was built using `${{ steps.get_rustc.outputs.rustc }}`"
draft: true
prerelease: false

- name: Upload crunch binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/crunch
asset_name: crunch
asset_content_type: application/octet-stream

- name: Upload crunch sha256
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/crunch.sha256
asset_name: crunch.sha256
asset_content_type: text/plain

file: docker/devnet.dockerfile
push: true
tags: crunch/app:latest
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
Cargo.lock
.env
.private.seed
bump-version.sh
bump-version.sh
/environments/**/.env
/environments/**/.private.seed
**/.env
**/.private.seed
1 change: 0 additions & 1 deletion .private.seed.example

This file was deleted.

Loading

0 comments on commit ca51756

Please sign in to comment.