diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf95000..f45c096 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -144,3 +144,60 @@ jobs: run: | export PATH=~/.cargo/bin:$PATH cd tests_zemu && yarn testSR25519 + + build_package: + needs: [ configure, build, build_ledger, test_zemu, test_zemu_sr25519 ] + if: ${{ github.ref == 'refs/heads/main' }} + runs-on: ubuntu-latest + container: + image: zondax/builder-bolos:latest + options: --user ${{ needs.configure.outputs.uid_gid }} + env: + BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk + BOLOS_ENV: /opt/bolos + HOME: /home/zondax_circle + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + - name: Install deps + run: pip install ledgerblue + - name: Build + shell: bash -l {0} + run: | + source $HOME/.cargo/env + make SUBSTRATE_PARSER_FULL=0 + - name: Set tag name var (1) + id: vars_1 + run: echo ::set-output name=tag_name::$(./app/pkg/installer_s.sh version) + - name: Create or Update Release (1) + id: create_release_1 + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + files: ./app/pkg/installer_s.sh + tag_name: ${{ steps.vars_1.outputs.tag_name }} + draft: false + prerelease: false + - name: Clear and rebuild XL version + shell: bash -l {0} + run: | + source $HOME/.cargo/env + make SUBSTRATE_PARSER_FULL=1 + cp rust/app/pkg/installer_s.sh rust/app/pkg/installer_baking_s.sh + cp app/pkg/installer_s.sh app/pkg/installer_XL_s.sh + - name: Set tag name var (2) + id: vars_2 + run: echo ::set-output name=tag_name::$(./app/pkg/installer_XL_s.sh version) + - name: Create or Update Release (2) + id: create_release_2 + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + files: ./app/pkg/installer_XL_s.sh + tag_name: ${{ steps.vars_2.outputs.tag_name }} + draft: false + prerelease: false