Merge pull request #9 from ggreif/simplifications #10
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
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- 'main' | |
jobs: | |
token-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: "0.15.1" | |
- name: Build target canister | |
run: dfx build --network ic --check token | |
- name: Download PocketIC | |
run: wget -c https://download.dfinity.systems/ic/69e1408347723dbaa7a6cd2faa9b65c42abbe861/openssl-static-binaries/x86_64-linux/pocket-ic.gz | |
- name: Extract and chmod PocketIC | |
run: gunzip pocket-ic.gz && chmod +x pocket-ic | |
- name: Install PocketIC Python Library | |
run: pip3 install --user pocket-ic | |
- name: Install pytest | |
run: pip3 install --user pytest | |
# - name: Run tests | |
# run: python3 -m unittest tests/icrc1_tests.py | |
- name: Gzip wasm | |
run: gzip -fckn ./.dfx/ic/canisters/token/token.wasm > token.wasm.gz | |
- name: Compute Wasm Hash | |
run: shasum -a 256 ./token.wasm.gz | cut -d ' ' -f 1 > token.wasm.gz.shasum | |
- name: Print Wasm Hash | |
run: cat ./token.wasm.gz.shasum | |
- name: Upload to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./token.wasm* | |
overwrite: true | |
file_glob: true | |