Skip to content

Commit

Permalink
GitHub actions (#19)
Browse files Browse the repository at this point in the history
* Try a Github Actions matrix build

* Guess around syntax error

* Experiment with uploading release assets
  • Loading branch information
bruceadams authored Feb 6, 2020
1 parent 0c2cfee commit 16e820b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 56 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
release:
types: [created]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: cargo build --release --verbose
- name: Clippy
run: cargo clippy --verbose
- name: Test
run: cargo test --verbose
- name: Publish
run: |
curl \
--data-binary @./target/release/yj \
--header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'Content-Type: application/octet-stream' \
--url https://uploads.github.com/repos/${{ github.repository }}/releases/1.1.1/assets?name=yj.${{ jobs.build.strategy.matrix.os }}
21 changes: 12 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Rust

on: [push]
on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}

runs-on: ubuntu-latest
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v1
- name: Build
run: cargo build --verbose
- name: Clippy
run: cargo clippy --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v1
- name: Build
run: cargo build --verbose
- name: Clippy
run: cargo clippy --verbose
- name: Run tests
run: cargo test --verbose
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# YJ - YAML to JSON
[![Build Status](https://travis-ci.com/bruceadams/yj.svg?branch=master)](https://travis-ci.com/bruceadams/yj)
![Rust](https://github.com/bruceadams/yj/workflows/Rust/badge.svg)

Simple command line tool to convert a YAML input file into a JSON output file.

Expand Down

0 comments on commit 16e820b

Please sign in to comment.