Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build
on:
push:
branches:
- main
pull_request: {}

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Cache dist folder
id: cache-dist
uses: actions/cache@v3
env:
cache-name: cache-dist
with:
path: dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: Run build
if: steps.cache-dist.outputs.cache-hit != 'true'
run: pnpm build


- name: Upload dist artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: dist
path: dist
41 changes: 41 additions & 0 deletions .github/workflows/workshop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Workshop
on:
push:
branches:
- main
pull_request: {}

env:
GREETING: Hello

jobs:
print-greeting:
name: Print greeting
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Print
run: echo $GREETING

save-greeting:
name: Save greeting
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Save to file
run: echo $GREETING > greeting.txt

- name: Store artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: greetingfile
path: greeting.txt