Skip to content

Commit

Permalink
Add github.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jan 24, 2024
1 parent 56ac648 commit 664c50d
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: moonrepo
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
format:
name: Format
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
cache: false
components: rustfmt
- run: cargo fmt --all --check
lint:
name: Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
cache: false
components: clippy
- run: cargo clippy --workspace --all-targets
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-nextest
cache: false
- uses: moonrepo/setup-toolchain@v0
- uses: moonrepo/build-wasm-plugin@v0
- run: cargo nextest run --no-default-features
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- "[a-z0-9_]+-v[0-9]+*"
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
cache: false
- id: build
uses: moonrepo/build-wasm-plugin@v0
- if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
uses: ncipollo/release-action@v1
with:
artifacts: builds/*
artifactErrorsFailBuild: true
body: ${{ steps.build.outputs.changelog-entry }}
makeLatest: true
prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}
skipIfReleaseExists: true

0 comments on commit 664c50d

Please sign in to comment.