Skip to content

Commit

Permalink
Refactoring workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored Jun 15, 2024
1 parent 153eb5d commit d005cab
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/ci.yaml → .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
name: CI
name: Deploy

on:
push:
workflow_run:
workflows: [Test]
types: [completed]
branches: [master]

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- run: npm run test

publish:
publish-extension:
name: Publish to marketplace
runs-on: ubuntu-latest
environment: Production
needs: test
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npm install
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test

on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]

jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npm install
- run: npm run test

0 comments on commit d005cab

Please sign in to comment.