From 3e7561a62850e9512f2ba0b4208160baeddb774b Mon Sep 17 00:00:00 2001 From: Erin Millard Date: Thu, 2 Dec 2021 19:28:35 +1000 Subject: [PATCH] Use reusable workflows from .github repo --- .github/workflows/ci-pr-size.yml | 16 +-------------- .github/workflows/ci-scheduled.yml | 14 +------------ .github/workflows/ci-website.yml | 18 +---------------- .github/workflows/ci.yml | 22 +------------------- .github/workflows/publish-package.yml | 29 +++------------------------ .github/workflows/publish-release.yml | 10 +-------- .github/workflows/publish-website.yml | 21 +------------------ 7 files changed, 9 insertions(+), 121 deletions(-) diff --git a/.github/workflows/ci-pr-size.yml b/.github/workflows/ci-pr-size.yml index 756ce15..33148ea 100644 --- a/.github/workflows/ci-pr-size.yml +++ b/.github/workflows/ci-pr-size.yml @@ -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 diff --git a/.github/workflows/ci-scheduled.yml b/.github/workflows/ci-scheduled.yml index 4f1c55c..2f7bc4f 100644 --- a/.github/workflows/ci-scheduled.yml +++ b/.github/workflows/ci-scheduled.yml @@ -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 diff --git a/.github/workflows/ci-website.yml b/.github/workflows/ci-website.yml index 92e4087..f5bfdd1 100644 --- a/.github/workflows/ci-website.yml +++ b/.github/workflows/ci-website.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f416c7..a0cc69b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index e3f530f..a765ba2 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -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 }} diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 393571d..7f83b0c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -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 diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index c40a462..ff74151 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -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/github-pages-deploy-action@4.1.7 - with: - branch: gh-pages - folder: website/artifacts/docusaurus/build + uses: snout-router/.github/.github/workflows/publish-website.yml@main