Skip to content

Commit

Permalink
build(general): divided workflows for prs and builds
Browse files Browse the repository at this point in the history
  • Loading branch information
andreszorro committed Mar 11, 2024
1 parent da0ac6b commit 8f94ecf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
23 changes: 2 additions & 21 deletions .github/workflows/main.yaml → .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, Test and Release
name: Test, Build and Release

on:
push:
Expand All @@ -7,32 +7,14 @@ on:
- main
tags:
- 'v*'
pull_request:
branches:
- develop
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.3.1
install: true
cache: true
experimental: true
- name: Test
run: |
bun install
bun test:ci
uses: ./.github/workflows/test.yaml
build:
needs: test
name: build-${{matrix.name}}
runs-on: ${{matrix.runs-on}}
if: ${{ github.event_name == 'push' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -83,7 +65,6 @@ jobs:
release:
needs: build
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
permissions:
contents: write
steps:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test

on:
workflow_call:
pull_request:
branches:
- develop
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mise Tools install
uses: jdx/mise-action@v2
with:
version: 2024.3.1
install: true
cache: true
experimental: true
- name: Test
run: |
bun install
bun test:ci

0 comments on commit 8f94ecf

Please sign in to comment.