Skip to content

v0.0.19

v0.0.19 #25

Workflow file for this run

name: Release
on:
release:
types: [released]
workflow_dispatch:
permissions:
contents: write
jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: astro-starter
target: scratch_astro_starter
out: astro-starter.tar.gz
- name: nextjs-starter
target: scratch_nextjs_starter
out: nextjs-starter.tar.gz
- name: nextjs-example
target: scratch_nextjs_example
out: nextjs-example.tar.gz
- name: react-starter
target: scratch_react_starter
out: react-starter.tar.gz
- name: react-example
target: scratch_react_example
out: react-example.tar.gz
- name: vue-starter
target: scratch_vue_starter
out: vue-starter.tar.gz
- name: vue-example
target: scratch_vue_example
out: vue-example.tar.gz
- name: angular-starter
target: scratch_angular_starter
out: angular-starter.tar.gz
- name: angular-example
target: scratch_angular_example
out: angular-example.tar.gz
- name: sveltekit-starter
target: scratch_sveltekit_starter
out: sveltekit-starter.tar.gz
- name: sveltekit-example
target: scratch_sveltekit_example
out: sveltekit-example.tar.gz
- name: vanilla-js-example
target: scratch_vanilla_js_example
out: vanilla-js-example.tar.gz
steps:
- uses: actions/checkout@v4
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
- name: Prepare template ${{ matrix.name }}
uses: docker/build-push-action@v5
with:
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.out }}
- run: mv out/${{ matrix.out }} ${{ matrix.out }}
- name: 'Upload ${{ matrix.name }}'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.out }}
path: ./${{ matrix.out }}
release:
name: Release
runs-on: ubuntu-latest
needs: ['docker-build']
steps:
- uses: actions/checkout@v4
- name: Download astro-starter
uses: actions/download-artifact@v4
with:
name: astro-starter.tar.gz
path: .
- name: Download nextjs-starter
uses: actions/download-artifact@v4
with:
name: nextjs-starter.tar.gz
path: .
- name: Download nextjs-example
uses: actions/download-artifact@v4
with:
name: nextjs-example.tar.gz
path: .
- name: Download react-starter
uses: actions/download-artifact@v4
with:
name: react-starter.tar.gz
path: .
- name: Download react-example
uses: actions/download-artifact@v4
with:
name: react-example.tar.gz
path: .
- name: Download vue-starter
uses: actions/download-artifact@v4
with:
name: vue-starter.tar.gz
path: .
- name: Download vue-example
uses: actions/download-artifact@v4
with:
name: vue-example.tar.gz
path: .
- name: Download angular-starter
uses: actions/download-artifact@v4
with:
name: angular-starter.tar.gz
path: .
- name: Download angular-example
uses: actions/download-artifact@v4
with:
name: angular-example.tar.gz
path: .
- name: Download sveltekit-starter
uses: actions/download-artifact@v4
with:
name: sveltekit-starter.tar.gz
path: .
- name: Download sveltekit-example
uses: actions/download-artifact@v4
with:
name: sveltekit-example.tar.gz
path: .
- name: Download vanilla-js-example
uses: actions/download-artifact@v4
with:
name: vanilla-js-example.tar.gz
path: .
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./astro-starter.tar.gz
./nextjs-starter.tar.gz
./nextjs-example.tar.gz
./react-starter.tar.gz
./react-example.tar.gz
./vue-starter.tar.gz
./vue-example.tar.gz
./angular-starter.tar.gz
./angular-example.tar.gz
./sveltekit-starter.tar.gz
./sveltekit-example.tar.gz
./vanilla-js-example.tar.gz
deploy:
name: Deploy to CDN
runs-on: ubuntu-latest
needs: ['docker-build']
steps:
- uses: actions/checkout@v4
- name: Download astro-starter
uses: actions/download-artifact@v4
with:
name: astro-starter.tar.gz
path: out/templates
- name: Download nextjs-starter
uses: actions/download-artifact@v4
with:
name: nextjs-starter.tar.gz
path: out/templates
- name: Download nextjs-example
uses: actions/download-artifact@v4
with:
name: nextjs-example.tar.gz
path: out/templates
- name: Download react-starter
uses: actions/download-artifact@v4
with:
name: react-starter.tar.gz
path: out/templates
- name: Download react-example
uses: actions/download-artifact@v4
with:
name: react-example.tar.gz
path: out/templates
- name: Download vue-starter
uses: actions/download-artifact@v4
with:
name: vue-starter.tar.gz
path: out/templates
- name: Download vue-example
uses: actions/download-artifact@v4
with:
name: vue-example.tar.gz
path: out/templates
- name: Download angular-starter
uses: actions/download-artifact@v4
with:
name: angular-starter.tar.gz
path: out/templates
- name: Download angular-example
uses: actions/download-artifact@v4
with:
name: angular-example.tar.gz
path: out/templates
- name: Download sveltekit-starter
uses: actions/download-artifact@v4
with:
name: sveltekit-starter.tar.gz
path: out/templates
- name: Download sveltekit-example
uses: actions/download-artifact@v4
with:
name: sveltekit-example.tar.gz
path: out/templates
- name: Download vanilla-js-example
uses: actions/download-artifact@v4
with:
name: vanilla-js-example.tar.gz
path: out/templates
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Deploy to Juno
uses: junobuild/juno-action@main
with:
args: deploy
env:
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}