v0.0.36 #51
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: Release | |
on: | |
release: | |
types: [released] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
##################### | |
# The docker builds # | |
##################### | |
docker-build-base: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build Base Docker Image | |
uses: ./.github/actions/docker-build-base | |
docker-build: | |
runs-on: ubuntu-latest | |
needs: docker-build-base | |
strategy: | |
matrix: | |
include: | |
- name: console.wasm.gz | |
target: scratch_console | |
- name: observatory.wasm.gz | |
target: scratch_observatory | |
- name: mission_control.wasm.gz | |
target: scratch_mission_control | |
- name: satellite.wasm.gz | |
target: scratch_satellite | |
- name: orbiter.wasm.gz | |
target: scratch_orbiter | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build ${{ matrix.name }} | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile | |
cache-from: type=gha,scope=cached-stage | |
# Exports the artefacts from the final stage | |
outputs: ./out | |
target: ${{ matrix.target }} | |
- run: sha256sum out/${{ matrix.name }} | |
- run: mv out/${{ matrix.name }} ${{ matrix.name }} | |
- name: 'Upload ${{ matrix.name }}' | |
uses: actions/upload-artifact@v4 | |
with: | |
# name is the name used to display and retrieve the artifact | |
name: ${{ matrix.name }} | |
# path is the name used as the file to upload and the name of the | |
# downloaded file | |
path: ./${{ matrix.name }} | |
metadata: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build metadata | |
run: bash .github/scripts/metadata | |
env: | |
CANISTERS: console,observatory,mission_control,satellite,orbiter | |
- name: Upload metadata | |
uses: actions/upload-artifact@v4 | |
with: | |
# name is the name used to display and retrieve the artifact | |
name: metadata.json | |
# path is the name used as the file to upload and the name of the | |
# downloaded file | |
path: ./metadata.json | |
candid: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: console.did | |
target: console | |
- name: observatory.did | |
target: observatory | |
- name: mission_control.did | |
target: mission_control | |
- name: satellite.did | |
target: satellite | |
- name: orbiter.did | |
target: orbiter | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Copy ${{ matrix.name }}' | |
run: bash .github/scripts/candid | |
env: | |
CANISTER: ${{ matrix.target }} | |
- name: 'Upload ${{ matrix.name }}' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: ./${{ matrix.name }} | |
candid_extension: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: satellite_extension.did | |
target: satellite | |
custom_did_file: satellite_extension.did | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Copy ${{ matrix.name }}' | |
run: bash .github/scripts/candid | |
env: | |
CANISTER: ${{ matrix.target }} | |
CUSTOM_DID_FILE: ${{ matrix.custom_did_file }} | |
- name: 'Upload ${{ matrix.name }}' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: ./${{ matrix.name }} | |
release: | |
runs-on: ubuntu-latest | |
needs: ['docker-build', 'metadata', 'candid', 'candid_extension'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download console.wasm.gz | |
uses: actions/download-artifact@v4 | |
with: | |
name: console.wasm.gz | |
path: . | |
- name: Download observatory.wasm.gz | |
uses: actions/download-artifact@v4 | |
with: | |
name: observatory.wasm.gz | |
path: . | |
- name: Download mission_control.wasm.gz | |
uses: actions/download-artifact@v4 | |
with: | |
name: mission_control.wasm.gz | |
path: . | |
- name: Download satellite.wasm.gz | |
uses: actions/download-artifact@v4 | |
with: | |
name: satellite.wasm.gz | |
path: . | |
- name: Download orbiter.wasm.gz | |
uses: actions/download-artifact@v4 | |
with: | |
name: orbiter.wasm.gz | |
path: . | |
- name: Download console.did | |
uses: actions/download-artifact@v4 | |
with: | |
name: console.did | |
path: . | |
- name: Download observatory.did | |
uses: actions/download-artifact@v4 | |
with: | |
name: observatory.did | |
path: . | |
- name: Download mission_control.did | |
uses: actions/download-artifact@v4 | |
with: | |
name: mission_control.did | |
path: . | |
- name: Download satellite.did | |
uses: actions/download-artifact@v4 | |
with: | |
name: satellite.did | |
path: . | |
- name: Download satellite_extension.did | |
uses: actions/download-artifact@v4 | |
with: | |
name: satellite_extension.did | |
path: . | |
- name: Download orbiter.did | |
uses: actions/download-artifact@v4 | |
with: | |
name: orbiter.did | |
path: . | |
- name: Download metadata.json | |
uses: actions/download-artifact@v4 | |
with: | |
name: metadata.json | |
path: . | |
- name: Prepare canisters | |
run: bash .github/scripts/prepare | |
env: | |
CANISTERS: console,observatory,mission_control,satellite,orbiter | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./console*.wasm.gz | |
./observatory*.wasm.gz | |
./orbiter*.wasm.gz | |
./mission_control*.wasm.gz | |
./satellite*.wasm.gz | |
./console*.did | |
./observatory*.did | |
./mission_control*.did | |
./satellite*.did | |
./orbiter*.did | |
./metadata.json |