Skip to content

Commit

Permalink
Refactored CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanV2 committed Oct 28, 2022
1 parent 6bb0d9b commit e7cec03
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
with:
folder: ${{github.workspace}}/src/Types

- name: Commit changes
- name: ✏️ Commit changes
continue-on-error: true
run: |
cd ${{github.workspace}}
git config --global user.email "[email protected]"
git config --global user.name "Blockception[bot]"
git config --global user.name "Orbi[bot]"
git add .
git commit -m "auto: Generated typescript includes"
git push
10 changes: 5 additions & 5 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Dependabot auto-merge
on: pull_request_target

concurrency:
group: dependabot-check
cancel-in-progress: false

permissions:
pull-requests: write
contents: write

concurrency:
group: dependabot-check
cancel-in-progress: false

jobs:
dependabot:
name: Dependabot auto merge
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
Expand All @@ -19,4 +20,3 @@ jobs:
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

18 changes: 12 additions & 6 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ on:
- completed

jobs:
build:
runs-on: ubuntu-latest
test:
name: 📋 Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -26,15 +31,16 @@ jobs:
cache-dependency-path: package-lock.json
node-version-file: .nvmrc

- name: Setup Project
- name: Setup project
run: npm ci

- name: 📋 Run Tests
run: npm test
run: npm run test

publish-npm:
needs: build
needs: test
runs-on: ubuntu-latest
name: 🚚 Npm Publish
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -49,7 +55,7 @@ jobs:
- name: Setup Project
run: npm ci

- name: Npm Publish
- name: 🚚 Npm Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
15 changes: 8 additions & 7 deletions .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: npm-unit-test
name: 📋 Npm Test

on:
push:
Expand All @@ -11,14 +11,14 @@ on:
branches:
- main

jobs:
jobs:
test:
name: Test on ${{ matrix.os }}
name: 📋 Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -30,7 +30,8 @@ jobs:
cache-dependency-path: package-lock.json
node-version-file: .nvmrc

- name: Build
- name: Setup project
run: npm ci
- name: Test
run: npm test

- name: 📋 Run Tests
run: npm run test
7 changes: 4 additions & 3 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "tagged-release"
name: 📑 Release Page

on:
push:
Expand All @@ -7,11 +7,12 @@ on:

jobs:
tagged-release:
name: "Tagged Release"
name: 📑 Release Page
runs-on: "ubuntu-latest"

steps:
- uses: "marvinpinto/action-automatic-releases@latest"
- name: 📑 Release Page
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

0 comments on commit e7cec03

Please sign in to comment.