Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
figsoda committed Apr 25, 2023
0 parents commit 1f364d6
Show file tree
Hide file tree
Showing 18 changed files with 2,394 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: daily

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ci

on:
push:
branches:
- main
pull_request:

jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-gnu
os: windows-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cargo build
run: |
rustup toolchain install stable --profile minimal -t ${{ matrix.target }}
cargo +stable build --target ${{ matrix.target }}
clippy-rustfmt:
name: clippy-rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: "Cargo: clippy, fmt"
run: |
rustup toolchain install stable --profile minimal -c clippy
rustup toolchain install nightly --profile minimal -c rustfmt
cargo +stable clippy -- -D warnings
cargo +nightly fmt -- --check
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

jobs:
create_release:
name: create_release
runs-on: ubuntu-latest
steps:
- name: Create release
uses: softprops/action-gh-release@v1
with:
body: "[Changelog](https://github.com/nix-community/nix-melt/blob/main/CHANGELOG.md)"

release:
name: release
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-gnu
os: windows-latest
ext: .exe
- target: x86_64-pc-windows-msvc
os: windows-latest
ext: .exe
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cargo build
run: |
rustup toolchain install nightly --profile minimal -t ${{ matrix.target }}
cargo +nightly build --release --target ${{ matrix.target }}
env:
RUSTFLAGS: -C strip=symbols

- name: Upload asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
tag: ${{ github.ref }}
file: target/${{ matrix.target }}/release/nix-melt${{ matrix.ext }}
asset_name: nix-melt-${{ matrix.target }}${{ matrix.ext }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/result
/target
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## v0.1.0 - 2023-04-25

First release
Loading

0 comments on commit 1f364d6

Please sign in to comment.