这是indexloc提供的服务,不要输入任何密码
Skip to content
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
28 changes: 28 additions & 0 deletions .github/workflows/duplicate_sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Duplicate-Package-Sample

on:
push:
branches:
- main

jobs:
duplicate:
name: duplicate package sample
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Run duplicate script file
run: bash ${GITHUB_WORKSPACE}/duplicate_package_sample.sh

- name: Commit and Push
run: |
git config --global user.email $git_email
git config --global user.name "${{ github.actor }}"
git add ./src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/. -f
git diff-index --cached --quiet HEAD || git commit -m "Auto-duplicate Package Samples"
git push
env:
git_email: "${{ github.actor }}@users.noreply.github.com"
14 changes: 14 additions & 0 deletions duplicate_package_sample.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Specify the source directory and the destination directory
SOURCE_DIRECTORY="src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0-pre001/Web3.Unity Samples/"
DESTINATION_DIRECTORY="src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/"

# clear destination directory first
rm -r "$DESTINATION_DIRECTORY"

# Copy source to the destination
cp -r "$SOURCE_DIRECTORY" "$DESTINATION_DIRECTORY"

#add all modified files
git add "src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/." -f

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.