-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Nettbureau Github | ||
|
||
This repository contains shared actions, workflows and other Github related files. The `profile/README.md` also sets the contents visible on our [Github company's page](https://github.com/nettbureau). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Setup | ||
|
||
inputs: | ||
nettbureau-auth-token: | ||
description: "Authentication token for Nettbureau packages" | ||
required: true | ||
fontawesome-auth-token: | ||
description: "Authentication token for Fontawesome packages" | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Setup private registries | ||
run: | | ||
npm config set "@nettbureau:registry" https://npm.pkg.github.com/ | ||
npm config set "//npm.pkg.github.com/:_authToken" ${{ inputs.nettbureau-auth-token }} | ||
npm config set "@fortawesome:registry" https://npm.fontawesome.com/ | ||
npm config set "//npm.fontawesome.com/:_authToken" ${{ inputs.fontawesome-auth-token }} | ||
shell: bash | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
install-command: yarn --frozen-lockfile --ignore-scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
FONTAWESOME_AUTH_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ./.github/actions/setup | ||
with: | ||
nettbureau-auth-token: ${{ secrets.GITHUB_TOKEN }} | ||
fontawesome-auth-token: ${{ secrets.FONTAWESOME_AUTH_TOKEN }} | ||
|
||
- name: Run linting | ||
run: yarn lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ./.github/actions/setup | ||
with: | ||
nettbureau-auth-token: ${{ secrets.GITHUB_TOKEN }} | ||
fontawesome-auth-token: ${{ secrets.FONTAWESOME_AUTH_TOKEN }} | ||
|
||
- name: Run tests | ||
run: yarn test --ci --coverage | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ./.github/actions/setup | ||
with: | ||
nettbureau-auth-token: ${{ secrets.GITHUB_TOKEN }} | ||
fontawesome-auth-token: ${{ secrets.FONTAWESOME_AUTH_TOKEN }} | ||
|
||
- name: Build code | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Install | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
NETTBUREAU_AUTH_TOKEN: | ||
required: true | ||
FONTAWESOME_AUTH_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ./.github/actions/setup | ||
with: | ||
nettbureau-auth-token: ${{ secrets.GITHUB_TOKEN }} | ||
fontawesome-auth-token: ${{ secrets.FONTAWESOME_AUTH_TOKEN }} | ||
|
||
- name: Build code | ||
run: yarn build | ||
|
||
- name: Release | ||
run: npx auto shipit | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Report Size | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
report-size: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Report size | ||
uses: preactjs/compressed-size-action@v2 |