Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 发布的时候自动上传生成结果/add build artifact when release #51

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: dependencies
run: sudo apt update && sudo apt install -y

- name: Set up Go
uses: actions/setup-go@v2
with:
Expand All @@ -39,7 +42,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
key: ${{ runner.os }}-cargo-${{ hashFiles('tools/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}

- name: install deps
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/rust_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: dependencies
run: sudo apt update && sudo apt install -y

- name: setup rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -34,7 +37,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
venus-worker/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('tools/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}

- name: lint
run: |
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: build for test/release

on:
push:
branches: [master]
tags: ['**']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
fetch-depth: '0'

- name: dependencies
run: sudo apt update && sudo apt install -y

- name: setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy

- name: setup build cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}

- name: Build
run: |
make build
cp target/release/go-fvm-sdk-tools target/release/go-fvm-sdk-tools_${{github.ref_name}}_linux-amd64
- name: shasum
run: shasum -a 256 target/release/go-fvm-sdk-tools > target/release/go-fvm-sdk-tools_${{github.ref_name}}_linux-amd64.sha256
shell: bash

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/go-fvm-sdk-tools_${{github.ref_name}}_linux-amd64.sha256
target/release/go-fvm-sdk-tools_${{github.ref_name}}_linux-amd64