Skip to content

Commit

Permalink
Tar i bruk yarn berry, bytter til yarn workspaces og bytter ut lerna …
Browse files Browse the repository at this point in the history
…versjonering og publish med changeset
  • Loading branch information
mrbjoern authored Apr 23, 2024
2 parents e12e3a8 + 317f451 commit 48e6c41
Show file tree
Hide file tree
Showing 23 changed files with 16,047 additions and 51,727 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
18 changes: 18 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [[
"@navikt/aap-felles-css",
"@navikt/aap-felles-react",
"@navikt/aap-felles-prettier",
"@navikt/aap-felles-utils",
"@navikt/aap-felles-utils-client",
"@navikt/eslint-config-aap"]
],
"linked": [],
"access": "public",
"baseBranch": "berry",
"updateInternalDependencies": "patch",
"ignore": []
}
57 changes: 34 additions & 23 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,50 @@ jobs:
- uses: "actions/checkout@v2"
- uses: "actions/setup-node@v2"
with:
node-version: "16"
node-version: "20"
registry-url: "https://npm.pkg.github.com"
- name: "install dependencies"
run: "npm ci"
run: "yarn --immutable"
env:
NODE_AUTH_TOKEN: "${{ secrets.READER_TOKEN }}"
- name: "test packages"
run: "npm run test"
run: "yarn workspaces foreach --all --exclude . run test"
- name: "build storybook"
run: "npm run build-storybook"
run: "yarn run build-storybook"
- name: "build packages"
run: "npm run build"
run: "yarn workspaces foreach --all 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"
- name: Create release Pull Request or publish to NPM
id: changesets
uses: changesets/action@v1
with:
org_name: "navikt"
env:
AUTH_TOKEN: "${{secrets.GITHUB_TOKEN}}"
- name: "Push"
run: |
npm run version:patch
npm run publish:ci
version: yarn changeset version
publish: yarn changeset release
createGithubReleases: false
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
#NPM_TOKEN: ${{ secrets.NPM_AUTOMATION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION }}
# - 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 }}"
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
Binary file added .yarn/install-state.gz
Binary file not shown.
7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nodeLinker: node-modules

npmScopes:
navikt:
npmAlwaysAuth: true
npmAuthToken: "${NPM_AUTH_TOKEN:-}"
npmRegistryServer: "https://npm.pkg.github.com"
Loading

0 comments on commit 48e6c41

Please sign in to comment.