forked from openwallet-foundation/sd-jwt-js
-
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.
WIP: Feat/versioning (openwallet-foundation#71)
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de> Signed-off-by: Lukas.J.Han <lukas.j.han@gmail.com> Signed-off-by: Lukas <Lukas@hopae.io> Co-authored-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de> Co-authored-by: Lukas.J.Han <lukas.j.han@gmail.com>
- Loading branch information
1 parent
3c4571b
commit b259b86
Showing
34 changed files
with
1,827 additions
and
714 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,14 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": "standard-with-typescript", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
} | ||
} |
172 changes: 172 additions & 0 deletions
172
.github/workflows/build-test-publish-on-push-cached.yaml
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,172 @@ | ||
name: build-test-publish-on-push-cached | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
- 'next' | ||
- 'unstable' | ||
push: | ||
branches: | ||
- 'main' | ||
- 'next' | ||
- 'unstable' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- run: pnpm add -g pnpm | ||
- name: 'Setup Node.js with pnpm cache' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install | ||
- run: pnpm build | ||
- name: 'Save build output' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- run: pnpm add -g pnpm | ||
- name: 'Restore build output' | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
restore-keys: ${{ runner.os }}-build-${{ github.sha }} | ||
fail-on-cache-miss: true | ||
- name: 'Setup Node.js with pnpm cache' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- name: 'Run node' | ||
run: pnpm test | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-artifacts | ||
path: coverage/ | ||
|
||
report-coverage: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-artifacts | ||
path: coverage | ||
# - name: Merge Code Coverage | ||
# run: npx nyc merge coverage/ coverage/coverage-final.json | ||
# TODO: include once we have codecov token setup | ||
# - uses: codecov/codecov-action@v3 | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
# fail_ci_if_error: false | ||
|
||
# lint: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: pnpm/action-setup@v3 | ||
# with: | ||
# version: 8 | ||
# - run: pnpm add -g pnpm | ||
# - name: 'Restore build output' | ||
# uses: actions/cache/restore@v4 | ||
# with: | ||
# path: ${{ github.workspace }} | ||
# key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
# restore-keys: ${{ runner.os }}-build-${{ github.sha }} | ||
# fail-on-cache-miss: true | ||
# - name: 'Setup Node.js with pnpm cache' | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 20 | ||
# cache: 'pnpm' | ||
# - name: 'Run lint' | ||
# run: pnpm run lint | ||
|
||
# Only run this job when the push is on main, next or unstable | ||
publish: | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/unstable') | ||
needs: | ||
- build | ||
- test | ||
# - lint | ||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
GH_TOKEN: ${{secrets.GH_TOKEN}} | ||
GITHUB_TOKEN: ${{secrets.GH_TOKEN}} | ||
GH_USER: ${{secrets.GH_USER}} | ||
GH_EMAIL: ${{secrets.GH_EMAIL}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{secrets.GH_TOKEN}} | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- run: pnpm add -g pnpm | ||
- name: 'Setup Node.js with pnpm cache' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: 'Restore build output' | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
restore-keys: ${{ runner.os }}-build-${{ github.sha }} | ||
fail-on-cache-miss: true | ||
|
||
- name: 'Setup git coordinates' | ||
run: | | ||
git remote set-url origin https://${{secrets.GH_USER}}:${{secrets.GH_TOKEN}}@github.com/${{ github.repository }}.git | ||
git config user.name $GH_USER | ||
git config user.email $GH_EMAIL | ||
- name: 'Setup npm registry' | ||
run: | | ||
echo "@veramo:registry=https://registry.npmjs.org/" > .npmrc | ||
echo "registry=https://registry.npmjs.org/" >> .npmrc | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | ||
npm whoami | ||
- name: 'Publish @latest when on main' | ||
if: github.ref == 'refs/heads/main' | ||
run: pnpm publish:latest | ||
|
||
- name: 'Publish @next when on next' | ||
if: github.ref == 'refs/heads/next' | ||
run: pnpm publish:next | ||
|
||
- name: 'Publish @unstable when on unstable branch' | ||
if: github.ref == 'refs/heads/unstable' | ||
run: pnpm publish:unstable |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
dist | ||
|
||
.vscode | ||
coverage | ||
coverage | ||
.npmrc |
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 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [2.0.3](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v2.0.2...v2.0.3) (2024-02-20) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* update versioning ([058a562](https://github.com/openwallet-foundation-labs/sd-jwt-js/commit/058a5623e9fad3ef37fd3b1a0627a98fa7b3d59e)) |
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 |
---|---|---|
@@ -1,7 +1,15 @@ | ||
{ | ||
"$schema": "node_modules/lerna/schemas/lerna-schema.json", | ||
"version": "2.0.1", | ||
"version": "2.0.3", | ||
"npmClient": "pnpm", | ||
"exact": true, | ||
"message": "chore(release): %s" | ||
"message": "chore(release): %s", | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"command": { | ||
"publish": { | ||
"conventionalCommits": true | ||
} | ||
} | ||
} |
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
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,8 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [2.0.3](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v2.0.2...v2.0.3) (2024-02-20) | ||
|
||
**Note:** Version bump only for package @hopae/sd-jwt-browser-crypto |
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
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 |
---|---|---|
@@ -1,14 +1,4 @@ | ||
// vite.config.ts | ||
import { defineConfig } from 'vite'; | ||
import { browserConfig } from '../../vitest.shared'; | ||
|
||
export default defineConfig({ | ||
test: { | ||
// Common test configuration | ||
globals: true, | ||
coverage: { | ||
reporter: ['text', 'json', 'html'], | ||
}, | ||
environment: 'node', // Default environment | ||
// Override per environment as needed | ||
}, | ||
}); | ||
export default browserConfig; |
Oops, something went wrong.