Skip to content

Commit

Permalink
Create GH release
Browse files Browse the repository at this point in the history
  • Loading branch information
olanod committed Apr 28, 2020
1 parent b2cd7d5 commit fe9d182
Showing 1 changed file with 36 additions and 15 deletions.
51 changes: 36 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
name: Rust

on:
push:
branches:
- master
on: push

jobs:
build:

name: Build project
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
# - uses: actions-rs/cargo@v1
# with:
# command: build
# args: --release
- name: build_foo
run: echo ${{ github.ref }} > foo.txt
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: foo.txt
# files: target/release/node
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit fe9d182

Please sign in to comment.