feat: update api documentation #330
Workflow file for this run
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
name: Build and Release | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
env: | |
IAS_SPID: ${{ secrets.IAS_SPID }} | |
SGX_ENABLED: ${{ secrets.SGX_ENABLED }} | |
IAS_API_KEY: ${{ secrets.IAS_API_KEY }} | |
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }} | |
ACCOUNT_MNEMONIC: ${{ secrets.ACCOUNT_MNEMONIC }} | |
PINATA_API_SECRET: ${{ secrets.PINATA_API_SECRET }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Install build-essential, curl, git, wget, and Docker | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential curl git wget | |
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
echo "Installed build-essential, curl, git, wget, and Docker" | |
- name: Setup Rust and Cargo | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.51.0 | |
override: true | |
components: rustc, cargo | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Update permissions | |
run: (cd ./packages/gramine/bazk-build && chmod +x *) | |
- name: Build app | |
run: yarn gramine build-app-dist | |
- name: Build manifest | |
run: yarn gramine build-manifest | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: ./packages/gramine/bazk-build/dist/ | |
release: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Download build artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: dist | |
path: ./dist | |
- name: Prepare release | |
run: zip -r dist.zip dist | |
- name: Get the current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M')" | |
- name: Create new release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.date.outputs.date }} | |
release_name: "Release: ${{ steps.date.outputs.date }}" | |
draft: false | |
prerelease: false | |
body: "Bazk new release at ${{ steps.date.outputs.date }}" | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_name: dist.zip | |
asset_path: ./dist.zip | |
asset_content_type: application/zip |