feat: Include registry canister by default #16
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build release artifacts | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| relname: x86_64-linux | |
| - os: ubuntu-22.04-arm | |
| relname: arm64-linux | |
| - os: macos-latest | |
| relname: arm64-darwin | |
| - os: macos-15-intel | |
| relname: x86_64-darwin | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}-1 | |
| - name: Setup environment variables | |
| run: | | |
| echo "RUSTFLAGS=--remap-path-prefix=${GITHUB_WORKSPACE}=/builds/dfinity" >> $GITHUB_ENV | |
| ver="v$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name=="icp-cli-network-launcher") | .version')" | |
| echo "VER=$ver" >> "$GITHUB_ENV" | |
| - name: Verify version tag | |
| if: ${{ github.ref_type == 'tag' }} | |
| run: | | |
| if [ "${GITHUB_REF_NAME}" != "${VER}" ]; then | |
| echo "Tag ${GITHUB_REF_NAME} does not match package version ${VER}" | |
| exit 1 | |
| fi | |
| - name: Build and package | |
| run: ./package.sh | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ github.ref_type == 'tag' }} | |
| with: | |
| name: icp-cli-network-launcher-${{ matrix.relname }}-${{ env.VER }} | |
| path: dist/icp-cli-network-launcher-${{ matrix.relname }}-${{ env.VER }}.tar.gz | |
| aggregate: | |
| name: build:required | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: ${{ always() }} | |
| steps: | |
| - if: ${{ needs.build.result != 'success' }} | |
| run: exit 1 | |
| release: | |
| name: Create release | |
| if: ${{ github.ref_type == 'tag' }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| relname: [x86_64-linux, arm64-linux, arm64-darwin, x86_64-darwin] | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: icp-cli-network-launcher-${{ matrix.relname }}-${{ github.ref_name }} | |
| - name: Upload tarball and sha256 | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: icp-*.tar.* | |
| file_glob: true | |
| tag: ${{ github.ref_name }} | |
| prerelease: true | |
| make_latest: false |