-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
beltram.maldant
committed
Mar 7, 2021
1 parent
3c785f2
commit e98cd3f
Showing
3 changed files
with
112 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
name: security-audit | ||
on: | ||
push: | ||
paths: | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
jobs: | ||
security_audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
#name: security-audit | ||
#on: | ||
# push: | ||
# paths: | ||
# - '**/Cargo.toml' | ||
# - '**/Cargo.lock' | ||
#jobs: | ||
# security_audit: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2.3.4 | ||
# - uses: actions-rs/audit-check@v1 | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,95 @@ | ||
name: ci | ||
|
||
on: [ push, pull_request ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
matrix: | ||
os: [ macos-latest, windows-latest, ubuntu-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- uses: Swatinem/rust-cache@v1 | ||
- name: cargo/check | ||
run: cargo check | ||
- name: cargo/test | ||
run: cargo test | ||
- name: cargo/clippy | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: cargo clippy | ||
release: | ||
# runs on tags only | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [check] | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
file: stubr | ||
from-file: ./target/release/stubr | ||
to-file: stubr-linux.tar.gz | ||
args: --best --lzma | ||
strip: true | ||
- os: macos-latest | ||
file: stubr | ||
from-file: ./target/release/stubr | ||
to-file: stubr-macos.tar.gz | ||
args: --best | ||
strip: true | ||
- os: windows-latest | ||
file: stubr.exe | ||
from-file: ./target/release/stubr.exe | ||
to-file: stubr-windows.zip | ||
args: -9 | ||
strip: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- uses: Swatinem/rust-cache@v1 | ||
- name: cargo/build | ||
run: cargo build --release | ||
- name: upx | ||
uses: svenstaro/upx-action@v2 | ||
with: | ||
file: ${{ matrix.from-file }} | ||
args: ${{ matrix.args }} | ||
strip: ${{ matrix.strip }} | ||
- name: compression/tar | ||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | ||
run: | | ||
cd target/release | ||
tar czf ${{ matrix.to-file }} ${{ matrix.file }} | ||
mv ${{ matrix.to-file }} ../.. | ||
- name: compression/zip | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
cd target/release | ||
7z a ${{ matrix.to-file }} ${{ matrix.file }} | ||
mv ${{ matrix.to-file }} ../.. | ||
- name: release-binary | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: ${{ matrix.to-file }} | ||
publish: | ||
# runs on tags only | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
needs: [release] | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
- uses: Swatinem/rust-cache@v1 | ||
- name: publish lib | ||
run: | | ||
cd lib | ||
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} | ||
- name: publish cli | ||
run: | | ||
cd cli | ||
sleep 180 | ||
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} | ||
#name: ci | ||
# | ||
#on: [ push, pull_request ] | ||
# | ||
#env: | ||
# CARGO_TERM_COLOR: always | ||
# | ||
#jobs: | ||
# check: | ||
# strategy: | ||
# matrix: | ||
# os: [ macos-latest, windows-latest, ubuntu-latest ] | ||
# runs-on: ${{ matrix.os }} | ||
# steps: | ||
# - uses: actions/checkout@v2.3.4 | ||
# - uses: Swatinem/rust-cache@v1 | ||
# - name: cargo/check | ||
# run: cargo check | ||
# - name: cargo/test | ||
# run: cargo test | ||
# - name: cargo/clippy | ||
# if: ${{ matrix.os == 'ubuntu-latest' }} | ||
# run: cargo clippy | ||
# release: | ||
# # runs on tags only | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# needs: [check] | ||
# strategy: | ||
# matrix: | ||
# include: | ||
# - os: ubuntu-latest | ||
# file: stubr | ||
# from-file: ./target/release/stubr | ||
# to-file: stubr-linux.tar.gz | ||
# args: --best --lzma | ||
# strip: true | ||
# - os: macos-latest | ||
# file: stubr | ||
# from-file: ./target/release/stubr | ||
# to-file: stubr-macos.tar.gz | ||
# args: --best | ||
# strip: true | ||
# - os: windows-latest | ||
# file: stubr.exe | ||
# from-file: ./target/release/stubr.exe | ||
# to-file: stubr-windows.zip | ||
# args: -9 | ||
# strip: false | ||
# runs-on: ${{ matrix.os }} | ||
# steps: | ||
# - uses: actions/checkout@v2.3.4 | ||
# - uses: Swatinem/rust-cache@v1 | ||
# - name: cargo/build | ||
# run: cargo build --release | ||
# - name: upx | ||
# uses: svenstaro/upx-action@v2 | ||
# with: | ||
# file: ${{ matrix.from-file }} | ||
# args: ${{ matrix.args }} | ||
# strip: ${{ matrix.strip }} | ||
# - name: compression/tar | ||
# if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | ||
# run: | | ||
# cd target/release | ||
# tar czf ${{ matrix.to-file }} ${{ matrix.file }} | ||
# mv ${{ matrix.to-file }} ../.. | ||
# - name: compression/zip | ||
# if: ${{ matrix.os == 'windows-latest' }} | ||
# run: | | ||
# cd target/release | ||
# 7z a ${{ matrix.to-file }} ${{ matrix.file }} | ||
# mv ${{ matrix.to-file }} ../.. | ||
# - name: release-binary | ||
# uses: softprops/action-gh-release@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# files: ${{ matrix.to-file }} | ||
# publish: | ||
# # runs on tags only | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# runs-on: ubuntu-latest | ||
# needs: [release] | ||
# steps: | ||
# - uses: actions/checkout@v2.3.4 | ||
# - uses: Swatinem/rust-cache@v1 | ||
# - name: publish lib | ||
# run: | | ||
# cd lib | ||
# cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} | ||
# - name: publish cli | ||
# run: | | ||
# cd cli | ||
# sleep 180 | ||
# cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} |