Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

feat: Archive this repo (#1493) #171

feat: Archive this repo (#1493)

feat: Archive this repo (#1493) #171

Workflow file for this run

name: Release
on:
push:
branches:
- main
- alpha
- beta
jobs:
test:
name: Test and lint
uses: open-sauced/open-sauced/.github/workflows/development.yml@main
docker:
name: Build container
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "鈽侊笍 checkout repository"
uses: actions/checkout@v2
- name: "馃敡 setup buildx"
uses: docker/setup-buildx-action@v1
- name: "馃敡 cache docker layers"
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: "馃敡 docker meta"
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ github.repository }}
tags: latest
- name: "馃摝 docker build"
uses: docker/build-push-action@v2
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=docker,dest=/tmp/docker.tar
push: false
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
- name: "馃搨 docker artifacts"
uses: actions/upload-artifact@v2
with:
name: docker
path: /tmp/docker.tar
build:
name: Build application
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "鈽侊笍 checkout repository"
uses: actions/checkout@v2
- name: "馃敡 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 16
- name: "馃敡 install npm@latest"
run: npm i -g npm@latest
- name: "馃摝 install dependencies"
uses: bahmutov/npm-install@v1
- name: "馃搳 repository visualizer"
id: diagram
uses: githubocto/repo-visualizer@0.7.1
with:
excluded_paths: "node_modules,build,.storybook,.netlify,.github,npm-shrinkwrap.json"
output_file: "public/diagram.svg"
should_push: false
root_path: "src/"
- name: "馃搳 visualiser artifacts"
uses: actions/upload-artifact@v2
with:
name: diagram
path: public/diagram.svg
- name: "馃殌 static app"
run: npm run build
- name: "馃搨 production artifacts"
uses: actions/upload-artifact@v2
with:
name: build
path: build
release:
environment:
name: production
url: https://github.com/${{ github.repository }}/releases/tag/${{ steps.semantic-release.outputs.release-tag }}
name: Semantic release
needs:
- test
- docker
- build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "鈽侊笍 checkout repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "鈾伙笍 clean up artifact paths"
run: |
rm -rf public/diagram.svg
rm -rf supabase/diagrams/
- name: "馃搨 download docker artifacts"
uses: actions/download-artifact@v2
with:
name: docker
path: /tmp
- name: "馃摝 load tag"
run: |
docker load --input /tmp/docker.tar
docker image ls -a
- name: "馃搨 download build artifacts"
uses: actions/download-artifact@v2
with:
name: build
path: build
- name: "馃搨 download diagram artifacts"
uses: actions/download-artifact@v2
with:
name: diagram
path: public/
- name: "馃殌 release"
id: semantic-release
uses: open-sauced/release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
cleanup:
name: Cleanup actions
needs:
- release
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "鈾伙笍 remove build artifacts"
uses: geekyeggo/delete-artifact@v1
with:
name: |
build
docker
diagram