Compare commits
16 Commits
master
...
ci/github-
Author | SHA1 | Date |
---|---|---|
German Lashevich | 24c852086e | 5 years ago |
German Lashevich | 07c9d5a5cb | 5 years ago |
German Lashevich | efe227c40a | 5 years ago |
German Lashevich | 7b24802f37 | 5 years ago |
German Lashevich | a233172953 | 5 years ago |
German Lashevich | 766fdc40e6 | 5 years ago |
German Lashevich | 7992af1f28 | 5 years ago |
German Lashevich | 388cc44bd3 | 5 years ago |
German Lashevich | 8f49abdb74 | 5 years ago |
German Lashevich | a1549e8468 | 5 years ago |
German Lashevich | a8bd624839 | 5 years ago |
German Lashevich | 6f358399d0 | 5 years ago |
German Lashevich | d1789efea9 | 5 years ago |
German Lashevich | 0913d29b57 | 5 years ago |
German Lashevich | d4d0d6200a | 5 years ago |
German Lashevich | b3b631e65b | 5 years ago |
@ -0,0 +1,35 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'refs/tags/*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Install latest stable
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- uses: actions/checkout@v1
|
||||
- name: Cache target directory
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.OS }}-target-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-target-${{ github.ref }}-
|
||||
${{ runner.OS }}-target-master-
|
||||
${{ runner.OS }}-target-
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
@ -0,0 +1,27 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
# branches:
|
||||
# - master
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Create release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_WORKAROUND_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
@ -1,15 +0,0 @@
|
||||
name: Rust
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
@ -0,0 +1,49 @@
|
||||
name: upload-release-assets
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
assets:
|
||||
name: Build and upload release assets
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Install latest stable rust toolchain
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
name: Checkout code
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.OS }}-target-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-target-${{ github.ref }}-
|
||||
${{ runner.OS }}-target-master-
|
||||
${{ runner.OS }}-target-
|
||||
|
||||
- name: Build release
|
||||
run: cargo build --release
|
||||
|
||||
- name: List dir
|
||||
run: ls -lR
|
||||
|
||||
- name: Upload release asset
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.assets_url }}
|
||||
asset_path: ./target/release/totp
|
||||
asset_name: totp-${{ runner.OS }}
|
||||
asset_content_type: application/octet-stream
|
Loading…
Reference in New Issue