Skip to content

Commit

Permalink
ci(utils): combine workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed May 26, 2023
1 parent 63d5a82 commit 4bf96d9
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 48 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/publish-utils.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/test-utils.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/utils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: 🛠 Test & Deploy Utils

on:
pull_request:
branches:
- main
paths:
- "packages/utils/**"
push:
branches:
- main
paths:
- "packages/utils/**"
tags:
- 'hyper-utils@*'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
deno-version: [1.x]

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: 🦕 Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}

- name: ⚡ Run Tests
run: |
cd packages/utils
deno task test
env:
CI: true

publish:
if: startsWith(github.ref, 'refs/tags/hyper-utils@')
needs: [test]
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: 🦕 Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

# - name: 🥚 Setup Eggs CLI
# run: |
# deno install -A -f --unstable --no-check https://x.nest.land/[email protected]/eggs.ts
# export PATH="/home/runner/.deno/bin:$PATH"
# eggs link ${{ secrets.NESTAPIKEY }}

# - name: 📘 Publish to Nest
# run: |
# cd packages/utils
# eggs publish --yes

0 comments on commit 4bf96d9

Please sign in to comment.