umbrelOS 1.3 Beta 2 #56
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: Create release on tag | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
create-release: | |
runs-on: 64-core-amd64 | |
defaults: | |
run: | |
working-directory: packages/os | |
steps: | |
# Checkout | |
- uses: actions/checkout@v3 | |
# Build Docker images | |
- run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin | |
- run: docker buildx create --use | |
- run: docker buildx build --platform linux/amd64,linux/arm64 --file umbrelos.Dockerfile --tag ghcr.io/${{ github.repository_owner }}/umbrelos:${{ env.VERSION }} --push ../../ | |
- run: mkdir -p build &&docker buildx imagetools inspect ghcr.io/${{ github.repository_owner }}/umbrelos:${{ env.VERSION }} > build/docker-umbrelos-${{ env.VERSION }} | |
# Build OS images | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
# Awkward hack to run in parallel but correctly handle errors | |
- run: | | |
npm run build:amd64 & | |
pid1=$! | |
npm run build:arm64 & | |
pid2=$! | |
wait $pid1 || exit 1 | |
wait $pid2 || exit 1 | |
# TODO: Use .img.xz for all release assets once https://github.com/balena-io/etcher/issues/4064 is fixed | |
- name: Compress release assets | |
# Awkward hack to run in parallel but correctly handle errors | |
run: | | |
cd build | |
zip umbrelos-pi4.img.zip umbrelos-pi4.img & | |
pid1=$! | |
zip umbrelos-pi5.img.zip umbrelos-pi5.img & | |
pid2=$! | |
sudo xz --keep --threads=0 umbrelos-amd64.img & | |
pid3=$! | |
wait $pid1 || exit 1 | |
wait $pid2 || exit 1 | |
wait $pid3 || exit 1 | |
- name: Create USB installer | |
run: npm run build:amd64:usb-installer | |
- name: Create SHASUM | |
run: shasum -a 256 build/* | tee build/SHA256SUMS | |
- name: OpenTimestamps | |
run: npm ci && npx ots-cli.js stamp build/SHA256SUMS | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 | |
with: | |
draft: true | |
name: umbrelOS ${{ github.ref_name }} | |
files: | | |
packages/os/build/SHA256SUMS* | |
packages/os/build/*.update | |
packages/os/build/*.img.zip | |
packages/os/build/*.img.xz | |
packages/os/usb-installer/build/*.iso.xz |