Skip to content

Commit

Permalink
Seperate CI and CD
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Noah committed Jan 30, 2021
1 parent db4c471 commit 8513c31
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will install Deno and run tests across stable and nightly builds on Windows, Ubuntu and macOS.
# For more information see: https://github.com/denolib/setup-deno

name: CD

on:
push:
branches: [master]
tags:
- 'v*.*.*'

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Setup repo ✨
Expand All @@ -37,9 +28,6 @@ jobs:
env:
GIT_TAG: ${{ steps.get-latest-tag.outputs.tag }}

- name: Benchmark 🏁
run: deno run --allow-net benchmark.ts

- uses: actions/upload-artifact@v2
with:
name: build
Expand Down Expand Up @@ -75,7 +63,6 @@ jobs:

- name: Release 📦
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/index.html
env:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Setup repo ✨
uses: actions/checkout@v2

- name: Setup Deno 🦎
uses: denolib/[email protected]
with:
deno-version: v1.7.0

- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
with:
semver_only: true

- name: Build 🧱
run: deno run --unstable --allow-read --allow-write --allow-env build.ts
env:
GIT_TAG: ${{ steps.get-latest-tag.outputs.tag }}

- name: Benchmark 🏁
run: deno run --allow-net benchmark.ts

- uses: actions/upload-artifact@v2
with:
name: build
path: build/

0 comments on commit 8513c31

Please sign in to comment.