Skip to content

Commit

Permalink
upd workflows with autopublish
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Mar 7, 2024
1 parent a02d9da commit 4c9eaf2
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 403 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
werf version
docker version
echo $GITHUB_REPOSITORY
echo $GITHUB_SHA
echo $GITHUB_REF_NAME
- name: Run Build
run: |
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
26 changes: 0 additions & 26 deletions .github/workflows/publish.yaml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/tag-rc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
push:
tags:
- '^\d+\.\d+\.\d+-rc\.\d+$'

jobs:
converge:
name: Converge
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install werf
uses: werf/actions/[email protected]

- name: Log in to registry
# This is where you will update the personal access token to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Run echo
run: |
werf version
docker version
echo $GITHUB_REPOSITORY
echo $GITHUB_REF_NAME
- name: Run Build
run: |
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
publish:
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [ 18 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodejs }}
- name: Publish
run: |
yarn install
yarn build
yarn lint
yarn test
yarn publish-rc
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
26 changes: 23 additions & 3 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '^\d+\.\d+\.\d+$'

jobs:
converge:
Expand Down Expand Up @@ -29,5 +29,25 @@ jobs:
echo $GITHUB_REF_NAME
- name: Run Build
run: |
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
publish:
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [ 18 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodejs }}
- name: Publish
run: |
yarn install
yarn build
yarn lint
yarn test
yarn publish-stable
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
4 changes: 2 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ enableTelemetry: false

nodeLinker: node-modules

npmAuthToken: "${NPM_AUTH_TOKEN:-}"
npmAuthToken: '${NPM_AUTH_TOKEN:-}'

packageExtensions:
debug@*:
Expand All @@ -19,6 +19,6 @@ packageExtensions:

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-after-install.cjs
spec: "https://raw.githubusercontent.com/mhassan1/yarn-plugin-after-install/v0.6.0/bundles/@yarnpkg/plugin-after-install.js"
spec: 'https://raw.githubusercontent.com/mhassan1/yarn-plugin-after-install/v0.6.0/bundles/@yarnpkg/plugin-after-install.js'

yarnPath: .yarn/releases/yarn-4.1.1.cjs
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
"lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' --ignore-path .gitignore",
"publish": "yarn workspaces foreach --no-private exec yarn npm publish",
"publish-rc": "yarn build && yarn workspaces foreach --no-private --all exec yarn npm publish --tag next",
"publish-stable": "yarn build && yarn workspaces foreach --no-private --all exec yarn npm publish",
"rsc": "node scripts/release-sanity-check.js",
"start": "yarn build:connector && yarn workspaces foreach --parallel --interlaced --verbose run start",
"test": "echo \"TODO\""
"test": "yarn workspaces foreach -pv --no-private --all run test"
},
"devDependencies": {
"@metamask/eslint-config": "^12.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/snap/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
'**/src/typia-generated/*.ts',
'**/*.js',
'**/scripts/**/*.js',
'**/src/**/*.test.ts',
'**/src/**/types/**/contracts/**/*.ts',
'**/src/**/types/**/graphql/**/*.ts',
],
Expand Down
21 changes: 0 additions & 21 deletions packages/snap/jest.config.ts

This file was deleted.

7 changes: 2 additions & 5 deletions packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
"prepublishOnly": "yarn && yarn build",
"serve": "mm-snap serve",
"start": "nodemon --watch src/ --ext ts --exec 'yarn build && yarn serve'",
"test": "yarn test:vc && yarn test:snap",
"test:snap": "node --experimental-vm-modules --trace-warnings ../../node_modules/jest/bin/jest.js --findRelatedTests src/tests/index.test.ts",
"test:vc": "node --experimental-vm-modules --trace-warnings ../../node_modules/jest/bin/jest.js --findRelatedTests ./src/tests/verifiable-credentials.test.ts",
"typia:generate": "typia generate --input src/typia-templates --output src/typia-generated --project tsconfig.json",
"preversion": "yarn && yarn build && git add snap.manifest.json"
},
Expand All @@ -60,8 +57,8 @@
"@metamask/snaps-utils": "^6.0.0",
"@noble/hashes": "^1.3.3",
"@noble/secp256k1": "1.7.1",
"@rarimo/rarime-connector": "workspace:*",
"@rarimo/zkp-iden3": "workspace:*",
"@rarimo/rarime-connector": "workspace:^",
"@rarimo/zkp-iden3": "workspace:^",
"base64-js": "^1.5.1",
"bech32": "^2.0.0",
"buffer": "6.0.3",
Expand Down
25 changes: 0 additions & 25 deletions packages/snap/src/tests/index.test.ts

This file was deleted.

Loading

0 comments on commit 4c9eaf2

Please sign in to comment.