|
| 1 | +--- |
| 2 | +name: "Release Runtime" |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + os: |
| 7 | + description: 'Operating system to build' |
| 8 | + required: true |
| 9 | + default: 'debian-12' |
| 10 | + type: choice |
| 11 | + options: |
| 12 | + - debian-12 |
| 13 | + channel: |
| 14 | + description: 'ALEPH channel to deploy to' |
| 15 | + required: false |
| 16 | + default: 'aleph-vm-ci' |
| 17 | + type: string |
| 18 | + description: |
| 19 | + description: 'Description for the runtime release' |
| 20 | + required: false |
| 21 | + default: 'Aleph VM Runtime' |
| 22 | + type: string |
| 23 | + |
| 24 | +jobs: |
| 25 | + build_and_release_runtime: |
| 26 | + name: "Build and Release Runtime" |
| 27 | + runs-on: ubuntu-latest |
| 28 | + steps: |
| 29 | + - name: Checkout repository |
| 30 | + uses: actions/checkout@v4 |
| 31 | + |
| 32 | + - name: Build rootfs |
| 33 | + uses: ./.github/actions/build-rootfs |
| 34 | + with: |
| 35 | + os: ${{ inputs.os }} |
| 36 | + artifact-name: aleph-${{ inputs.os }}-python.squashfs |
| 37 | + |
| 38 | + - name: Setup Python |
| 39 | + uses: actions/setup-python@v5 |
| 40 | + with: |
| 41 | + python-version: '3.11' |
| 42 | + |
| 43 | + - name: Install aleph-client |
| 44 | + run: | |
| 45 | + pip install aleph-client |
| 46 | +
|
| 47 | + - name: Upload runtime to ALEPH network |
| 48 | + env: |
| 49 | + PRIVATE_KEY: ${{ secrets.ALEPH_WALLET_PRIVATE_KEY }} |
| 50 | + run: | |
| 51 | + # Upload the runtime squashfs to ALEPH |
| 52 | + echo "Uploading runtime to ALEPH network..." |
| 53 | +
|
| 54 | + aleph file upload runtimes/aleph-${{ inputs.os }}-python/rootfs.squashfs \ |
| 55 | + --private-key $PRIVATE_KEY \ |
| 56 | + --channel ${{ inputs.channel }} |
| 57 | +
|
| 58 | + echo "✅ Runtime uploaded successfully to channel: ${{ inputs.channel }}" |
| 59 | + echo "Description: ${{ inputs.description }}" |
| 60 | +
|
| 61 | + - name: Create release summary |
| 62 | + run: | |
| 63 | + echo "# Runtime Release Summary" >> $GITHUB_STEP_SUMMARY |
| 64 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 65 | + echo "- **OS**: ${{ inputs.os }}" >> $GITHUB_STEP_SUMMARY |
| 66 | + echo "- **Channel**: ${{ inputs.channel }}" >> $GITHUB_STEP_SUMMARY |
| 67 | + echo "- **Description**: ${{ inputs.description }}" >> $GITHUB_STEP_SUMMARY |
| 68 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 69 | + echo "Runtime has been successfully uploaded to the ALEPH network." >> $GITHUB_STEP_SUMMARY |
0 commit comments