just/.github/workflows/main.yaml
Casey Rodarmor 1dbc765390
Add --variables subcommand that prints variable names (#608)
Add a subcommand that prints out a space-separated list of the names of
top-level variables in the justfile.

The syntax is:

    $ just --variables
    a b c

This can be used for any purpose, but is mostly intended for completion
scripts, so that they can get the names of variables without using
`--evaluate`.

Additionally:

- Add `bin/generate-completions` script to regenerate checked-in
  completions
- Update dependencies
- Regenerate checked-in completions
2020-03-13 22:19:43 -07:00

80 lines
2.0 KiB
YAML

name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
all:
name: All
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v1
- name: Install Main Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
profile: minimal
components: clippy, rustfmt
override: true
- name: Version
run: |
rustup --version
cargo --version
cargo clippy --version
- name: Build
run: cargo build --all --verbose
- name: Test
run: cargo test --all --verbose
- name: Clippy
run: cargo clippy --all
- name: Lint
if: matrix.os != 'windows-latest'
run: cargo run lint
- name: Install Rustfmt Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
profile: minimal
components: rustfmt
- name: Format
run: cargo +nightly fmt --all -- --check
- name: Completion Scripts
if: matrix.os != 'windows-latest'
run: |
./bin/generate-completions
git diff --no-ext-diff --quiet --exit-code
- name: Package
id: package
if: startsWith(github.ref, 'refs/tags/v')
run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{ matrix.target }}
shell: bash
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: false
files: ${{ steps.package.outputs.archive }}
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}