Skip to content

Commit

Permalink
Use reusable workflows from .github repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Dec 2, 2021
1 parent f9c0509 commit 3e7561a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 121 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/ci-pr-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,4 @@ on:
pull_request:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Publish size report
uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: size-limit-build
clean_script: size-limit-clean
uses: snout-router/.github/.github/workflows/ci-pr-size.yml@main
14 changes: 1 addition & 13 deletions .github/workflows/ci-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,4 @@ on:
- cron: 0 14 * * 0 # Sunday 2PM UTC = Monday 12AM AEST
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: make node_modules
- name: Make
run: make ci
uses: snout-router/.github/.github/workflows/ci-scheduled.yml@main
18 changes: 1 addition & 17 deletions .github/workflows/ci-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,4 @@ on:
pull_request:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: make node_modules
- name: Install website dependencies
working-directory: website
run: make node_modules
- name: Make
working-directory: website
run: make ci
uses: snout-router/.github/.github/workflows/ci-website.yml@main
22 changes: 1 addition & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,4 @@ on:
pull_request:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: make node_modules
- name: Make
run: make ci
- name: Publish coverage
uses: codecov/codecov-action@v2
- name: Publish dist artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v2
with:
name: dist
path: artifacts/dist
uses: snout-router/.github/.github/workflows/ci.yml@main
29 changes: 3 additions & 26 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,6 @@ on:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
runs-on: ubuntu-latest
name: Publish package
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: make node_modules
- name: Make
run: make ci
- name: Set package version
run: make set-package-version
- name: Publish package
if: success()
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish dist artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: artifacts/dist
uses: snout-router/.github/.github/workflows/publish-package.yml@main
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 1 addition & 9 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,4 @@ on:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
name: Publish release
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Publish release
uses: eloquent/github-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: snout-router/.github/.github/workflows/publish-release.yml@main
21 changes: 1 addition & 20 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,4 @@ on:
- 'website/**'
jobs:
publish:
runs-on: ubuntu-latest
name: Publish website
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
working-directory: website
run: make node_modules
- name: Build website
working-directory: website
run: make release
- name: Publish website
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: website/artifacts/docusaurus/build
uses: snout-router/.github/.github/workflows/publish-website.yml@main

0 comments on commit 3e7561a

Please sign in to comment.