From 8513c317b99ddb24f9372a44192f2f9412845e97 Mon Sep 17 00:00:00 2001 From: The Noah Date: Fri, 29 Jan 2021 21:58:15 -0600 Subject: [PATCH] Seperate CI and CD --- .github/workflows/cd.yml | 15 +-------------- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index fa585d8..39afe4e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 ✨ @@ -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 @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9661be0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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/setup-deno@v2.3.0 + 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/