-
Notifications
You must be signed in to change notification settings - Fork 5
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
155 additions
and
153 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,84 +1,84 @@ | ||
name: Prepare release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'chainprof-v*' | ||
push: | ||
tags: | ||
- "chainprof-v*" | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/create-release@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: "${{ github.ref_name }}" | ||
body: | | ||
Version ${{ github.ref_name }}. | ||
draft: true | ||
prerelease: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
upload_assets: | ||
runs-on: ubuntu-20.04 | ||
needs: create_release | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ["linux", "darwin", "windows"] | ||
arch: ["386", "amd64", "arm64"] | ||
exclude: | ||
- os: "darwin" | ||
arch: "arm" | ||
- os: "darwin" | ||
arch: "386" | ||
- os: "windows" | ||
arch: "arm" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.18.0 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.20.0 | ||
create_release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/create-release@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: "${{ github.ref_name }}" | ||
body: | | ||
Version ${{ github.ref_name }}. | ||
draft: true | ||
prerelease: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
upload_assets: | ||
runs-on: ubuntu-20.04 | ||
needs: create_release | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ["linux", "darwin", "windows"] | ||
arch: ["386", "amd64", "arm64"] | ||
exclude: | ||
- os: "darwin" | ||
arch: "arm" | ||
- os: "darwin" | ||
arch: "386" | ||
- os: "windows" | ||
arch: "arm" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.18.0 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.20.0 | ||
|
||
- name: Install dependencies | ||
working-directory: ./web3 | ||
run: npm install | ||
- name: Run Hardhat compile | ||
working-directory: ./web3 | ||
run: npx hardhat compile | ||
- name: Install seer | ||
run: go install github.com/moonstream-to/seer@latest | ||
- name: Install dependencies | ||
working-directory: ./web3 | ||
run: npm install | ||
- name: Run Hardhat compile | ||
working-directory: ./web3 | ||
run: npx hardhat compile | ||
- name: Install seer | ||
run: go install github.com/moonstream-to/seer@latest | ||
|
||
- name: Build interface with seer | ||
run: seer evm generate --package Game7Token --output bindings/Game7Token/Game7Token.go --hardhat web3/artifacts/contracts/Token/Game7Token.sol/Game7Token.json --cli --struct Game7Token | ||
- name: Build interface with seer | ||
run: seer evm generate --package Game7Token --output bindings/Game7Token/Game7Token.go --hardhat web3/artifacts/contracts/Token/Game7Token.sol/Game7Token.json --cli --struct Game7Token | ||
|
||
- name: Build binary for each valid (GOOS, GOARCH) pair | ||
env: | ||
GOOS: ${{ matrix.os }} | ||
GOARCH: ${{ matrix.arch }} | ||
run: | | ||
BUILD_DIR="${{ github.ref_name }}-${GOOS}-${GOARCH}" | ||
EXTENSION="" | ||
if [ "$GOOS" = "windows" ]; then | ||
EXTENSION=".exe" | ||
fi | ||
mkdir "$BUILD_DIR" | ||
cp README.md "$BUILD_DIR/README.md" | ||
go build -o "$BUILD_DIR/chainprof${EXTENSION}" ./cmd/chainprof | ||
zip -r "$BUILD_DIR.zip" "$BUILD_DIR" | ||
- name: Upload release asset for each valid (GOOS, GOARH) pair | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: ./${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_name: ${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_content_type: application/zip | ||
- name: Build binary for each valid (GOOS, GOARCH) pair | ||
env: | ||
GOOS: ${{ matrix.os }} | ||
GOARCH: ${{ matrix.arch }} | ||
run: | | ||
BUILD_DIR="${{ github.ref_name }}-${GOOS}-${GOARCH}" | ||
EXTENSION="" | ||
if [ "$GOOS" = "windows" ]; then | ||
EXTENSION=".exe" | ||
fi | ||
mkdir "$BUILD_DIR" | ||
cp README.md "$BUILD_DIR/README.md" | ||
go build -o "$BUILD_DIR/chainprof${EXTENSION}" ./cmd/chainprof | ||
zip -r "$BUILD_DIR.zip" "$BUILD_DIR" | ||
- name: Upload release asset for each valid (GOOS, GOARH) pair | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: ./${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_name: ${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_content_type: application/zip |
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,84 +1,84 @@ | ||
name: Prepare release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'game7-v*' | ||
push: | ||
tags: | ||
- "game7-v*" | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/create-release@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: "${{ github.ref_name }}" | ||
body: | | ||
Version ${{ github.ref_name }}. | ||
draft: true | ||
prerelease: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
upload_assets: | ||
runs-on: ubuntu-20.04 | ||
needs: create_release | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ["linux", "darwin", "windows"] | ||
arch: ["386", "amd64", "arm64"] | ||
exclude: | ||
- os: "darwin" | ||
arch: "arm" | ||
- os: "darwin" | ||
arch: "386" | ||
- os: "windows" | ||
arch: "arm" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.18.0 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.20.0 | ||
create_release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/create-release@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: "${{ github.ref_name }}" | ||
body: | | ||
Version ${{ github.ref_name }}. | ||
draft: true | ||
prerelease: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
upload_assets: | ||
runs-on: ubuntu-20.04 | ||
needs: create_release | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ["linux", "darwin", "windows"] | ||
arch: ["386", "amd64", "arm64"] | ||
exclude: | ||
- os: "darwin" | ||
arch: "arm" | ||
- os: "darwin" | ||
arch: "386" | ||
- os: "windows" | ||
arch: "arm" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.18.0 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.20.0 | ||
|
||
- name: Install dependencies | ||
working-directory: ./web3 | ||
run: npm install | ||
- name: Run Hardhat compile | ||
working-directory: ./web3 | ||
run: npx hardhat compile | ||
- name: Install seer | ||
run: go install github.com/moonstream-to/seer@latest | ||
- name: Install dependencies | ||
working-directory: ./web3 | ||
run: npm install | ||
- name: Run Hardhat compile | ||
working-directory: ./web3 | ||
run: npx hardhat compile | ||
- name: Install seer | ||
run: go install github.com/moonstream-to/seer@latest | ||
|
||
- name: Build interface with seer | ||
run: seer evm generate --package Game7Token --output bindings/Game7Token/Game7Token.go --hardhat web3/artifacts/contracts/Token/Game7Token.sol/Game7Token.json --cli --struct Game7Token | ||
- name: Build interface with seer | ||
run: seer evm generate --package Game7Token --output bindings/Game7Token/Game7Token.go --hardhat web3/artifacts/contracts/Token/Game7Token.sol/Game7Token.json --cli --struct Game7Token | ||
|
||
- name: Build binary for each valid (GOOS, GOARCH) pair | ||
env: | ||
GOOS: ${{ matrix.os }} | ||
GOARCH: ${{ matrix.arch }} | ||
run: | | ||
BUILD_DIR="${{ github.ref_name }}-${GOOS}-${GOARCH}" | ||
EXTENSION="" | ||
if [ "$GOOS" = "windows" ]; then | ||
EXTENSION=".exe" | ||
fi | ||
mkdir "$BUILD_DIR" | ||
cp README.md "$BUILD_DIR/README.md" | ||
go build -o "$BUILD_DIR/game7${EXTENSION}" ./cmd/game7 | ||
zip -r "$BUILD_DIR.zip" "$BUILD_DIR" | ||
- name: Upload release asset for each valid (GOOS, GOARH) pair | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: ./${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_name: ${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_content_type: application/zip | ||
- name: Build binary for each valid (GOOS, GOARCH) pair | ||
env: | ||
GOOS: ${{ matrix.os }} | ||
GOARCH: ${{ matrix.arch }} | ||
run: | | ||
BUILD_DIR="${{ github.ref_name }}-${GOOS}-${GOARCH}" | ||
EXTENSION="" | ||
if [ "$GOOS" = "windows" ]; then | ||
EXTENSION=".exe" | ||
fi | ||
mkdir "$BUILD_DIR" | ||
cp README.md "$BUILD_DIR/README.md" | ||
go build -o "$BUILD_DIR/game7${EXTENSION}" ./cmd/game7 | ||
zip -r "$BUILD_DIR.zip" "$BUILD_DIR" | ||
- name: Upload release asset for each valid (GOOS, GOARH) pair | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: ./${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_name: ${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.zip | ||
asset_content_type: application/zip |
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,7 +1,9 @@ | ||
name: Smart Contracts CI | ||
|
||
on: | ||
- push | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
tests: | ||
|