Refactor Ethereum txId logic and update tests #81
This file contains hidden or 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
| name: generate-doc | ||
| on: | ||
| # release: | ||
| # types: [published] | ||
| jobs: | ||
| generate-doc: | ||
| runs-on: macos-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| path: main | ||
| - name: Get tag | ||
| id: vars | ||
| run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
| working-directory: main | ||
| - name: Setup ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: 3.0.2 | ||
| bundler-cache: true | ||
| - name: Build doc | ||
| env: | ||
| RELEASE_VERSION: ${{steps.vars.outputs.tag}} | ||
| run: | | ||
| cd iOS && bundle install | ||
| bundle exec jazzy \ | ||
| --clean \ | ||
| --output .build/jazzy \ | ||
| --author 'Flow Mobile Team' \ | ||
| --author_url https://github.com/onflow \ | ||
| --github_url https://github.com/onflow/flow-wallet-kit \ | ||
| --github-file-prefix https://github.com/onflow/flow-wallet-kit/tree/${RELEASE_VERSION} \ | ||
| --module-version ${RELEASE_VERSION} \ | ||
| --source-directory FlowWalletKit/Sources | ||
| working-directory: main | ||
| - name: Checkout doc | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: gh-pages | ||
| path: gh-pages | ||
| - name: Clean old doc | ||
| run: rm -rf docs/current | ||
| working-directory: gh-pages | ||
| - name: Copy new doc | ||
| env: | ||
| G_WORKSPACE: ${{github.workspace}} | ||
| RELEASE_VERSION: ${{steps.vars.outputs.tag}} | ||
| run: | | ||
| mkdir -p docs/current | ||
| mkdir -p docs/$RELEASE_VERSION | ||
| cp -R ${G_WORKSPACE}/main/.build/jazzy/* docs/current | ||
| cp -R ${G_WORKSPACE}/main/.build/jazzy/* docs/$RELEASE_VERSION | ||
| working-directory: gh-pages | ||
| - name: Commit | ||
| env: | ||
| RELEASE_VERSION: ${{steps.vars.outputs.tag}} | ||
| run: | | ||
| git config user.name github-actions | ||
| git config user.email [email protected] | ||
| git add . | ||
| git commit -m "generate ${RELEASE_VERSION} docs automatically" | ||
| git push | ||
| working-directory: gh-pages | ||