-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.69 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: "Build and publish common libs"
on:
workflow_dispatch:
push:
branches:
- "main"
env:
"IMAGE": "ghcr.io/${{ github.repository }}:${{ github.sha }}"
jobs:
"build":
name: "build"
runs-on: "ubuntu-latest"
permissions:
contents: write
id-token: write
packages: write
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-node@v2"
with:
node-version: "16"
registry-url: "https://npm.pkg.github.com"
- name: "install dependencies"
run: "npm ci"
env:
NODE_AUTH_TOKEN: "${{ secrets.READER_TOKEN }}"
- name: "test packages"
run: "npm run test"
- name: "build storybook"
run: "npm run build-storybook"
- name: "build packages"
run: "npm run build"
- name: "Deploy storybook"
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: storybook-static # The folder the action should deploy.
- name: "Login"
run: |
git config user.email "[email protected]"
git config user.name "Team Innbygger"
git remote set-url origin https://github-actions[bot]:[email protected]/navikt/aap-felles-innbygger.git
git fetch origin
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: "Create a .npmrc file for the github package repository"
uses: "FerLuisxd/create-npmrc@3"
with:
org_name: "navikt"
env:
AUTH_TOKEN: "${{secrets.GITHUB_TOKEN}}"
- name: "Push"
run: |
npm run version:patch
npm run publish:ci
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"