-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
3 changed files
with
64 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish release | ||
|
||
on: | ||
create: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yaml | ||
|
||
release: | ||
needs: test | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: nearprotocol/contract-builder | ||
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined | ||
env: | ||
RUSTFLAGS: -C link-arg=-s | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: | | ||
rustup toolchain install stable | ||
rustup default stable | ||
rustup target add wasm32-unknown-unknown | ||
cargo build --target wasm32-unknown-unknown --profile release | ||
mv target/wasm32-unknown-unknown/release/usdt_gold.wasm target/usdt_gold.wasm | ||
- name: Publish | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "target/usdt_gold.wasm" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Run tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run Rustfmt | ||
run: cargo fmt -- --check | ||
- name: Run unit tests | ||
run: cargo test --verbose | ||
- name: Install NPM dependencies | ||
run: npm install | ||
- name: Build | ||
run: npm run build |
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