From 98986e9a118f209fdd0f4a25a6e88731e0b3d818 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Fri, 17 Jul 2020 12:22:13 +0200 Subject: [PATCH] Update github actions --- .github/workflows/build-lesspass-pure-package.yml | 39 ++++++++++++++++++++++ .../workflows/deploy-lesspass-crypto-package.yml | 29 ++++++++++++++++ .../workflows/deploy-lesspass-entropy-package.yml | 29 ++++++++++++++++ .../deploy-lesspass-fingerprint-package.yml | 29 ++++++++++++++++ .github/workflows/deploy-lesspass-package.yml | 29 ++++++++++++++++ .github/workflows/deploy-lesspass-pure-package.yml | 22 ++++++++++++ .../deploy-lesspass-render-password-package.yml | 29 ++++++++++++++++ .github/workflows/deploy-packages.yml | 29 ---------------- packages/deploy | 37 ++++++++++---------- yarn.lock | 25 ++++++++++++++ 10 files changed, 248 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/build-lesspass-pure-package.yml create mode 100644 .github/workflows/deploy-lesspass-crypto-package.yml create mode 100644 .github/workflows/deploy-lesspass-entropy-package.yml create mode 100644 .github/workflows/deploy-lesspass-fingerprint-package.yml create mode 100644 .github/workflows/deploy-lesspass-package.yml create mode 100644 .github/workflows/deploy-lesspass-pure-package.yml create mode 100644 .github/workflows/deploy-lesspass-render-password-package.yml delete mode 100644 .github/workflows/deploy-packages.yml diff --git a/.github/workflows/build-lesspass-pure-package.yml b/.github/workflows/build-lesspass-pure-package.yml new file mode 100644 index 0000000..970804d --- /dev/null +++ b/.github/workflows/build-lesspass-pure-package.yml @@ -0,0 +1,39 @@ +name: build-lesspass-pure-package + +on: + push: + paths: + - "packages/lesspass-pure/**" + - "!packages/lesspass-pure/dist/**" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: git hash + run: | + git rev-parse HEAD + - name: test lesspass-pure package + run: | + ls packages/lesspass-pure/dist + yarn install + yarn workspace lesspass-pure run test + + build-and-commit-and-push: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + with: + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + - name: build lesspass-pure package + run: | + yarn install + yarn workspace lesspass-pure run build + - name: commit build and push + run: | + git config --global user.name 'botsito' + git config --global user.email 'botsito@lesspass.com' + git commit -am "Auto build for lesspass-pure" + git push diff --git a/.github/workflows/deploy-lesspass-crypto-package.yml b/.github/workflows/deploy-lesspass-crypto-package.yml new file mode 100644 index 0000000..2968be2 --- /dev/null +++ b/.github/workflows/deploy-lesspass-crypto-package.yml @@ -0,0 +1,29 @@ +name: deploy-lesspass-crypto-package + +on: + push: + paths: + - "packages/lesspass-crypto/**" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: test lesspass-crypto package + run: | + yarn install + yarn workspace lesspass-crypto run test + + deploy: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - name: deploy lesspass-crypto package + run: | + cd packages + ./deploy lesspass-crypto + continue-on-error: true + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-entropy-package.yml b/.github/workflows/deploy-lesspass-entropy-package.yml new file mode 100644 index 0000000..7fa213e --- /dev/null +++ b/.github/workflows/deploy-lesspass-entropy-package.yml @@ -0,0 +1,29 @@ +name: deploy-lesspass-entropy-package + +on: + push: + paths: + - "packages/lesspass-entropy/**" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: test lesspass-entropy package + run: | + yarn install + yarn workspace lesspass-entropy run test + + deploy: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - name: deploy lesspass-entropy package + run: | + cd packages + ./deploy lesspass-entropy + continue-on-error: true + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-fingerprint-package.yml b/.github/workflows/deploy-lesspass-fingerprint-package.yml new file mode 100644 index 0000000..026cb91 --- /dev/null +++ b/.github/workflows/deploy-lesspass-fingerprint-package.yml @@ -0,0 +1,29 @@ +name: deploy-lesspass-fingerprint-package + +on: + push: + paths: + - "packages/lesspass-fingerprint/**" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: test lesspass-fingerprint package + run: | + yarn install + yarn workspace lesspass-fingerprint run test + + deploy: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - name: deploy lesspass-fingerprint package + run: | + cd packages + ./deploy lesspass-fingerprint + continue-on-error: true + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-package.yml b/.github/workflows/deploy-lesspass-package.yml new file mode 100644 index 0000000..a792c0d --- /dev/null +++ b/.github/workflows/deploy-lesspass-package.yml @@ -0,0 +1,29 @@ +name: deploy-lesspass-package + +on: + push: + paths: + - "packages/lesspass/**" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: test lesspass package + run: | + yarn install + yarn workspace lesspass run test + + deploy: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - name: deploy lesspass package + run: | + cd packages + ./deploy lesspass + continue-on-error: true + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-pure-package.yml b/.github/workflows/deploy-lesspass-pure-package.yml new file mode 100644 index 0000000..7bc095a --- /dev/null +++ b/.github/workflows/deploy-lesspass-pure-package.yml @@ -0,0 +1,22 @@ +name: deploy-lesspass-pure-package + +on: + push: + paths: + - "packages/lesspass-pure/dist/**" + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: git hash + run: | + git rev-parse HEAD + - name: deploy lesspass-pure package + run: | + cd packages + ./deploy lesspass-pure + continue-on-error: true + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-lesspass-render-password-package.yml b/.github/workflows/deploy-lesspass-render-password-package.yml new file mode 100644 index 0000000..a0d24ec --- /dev/null +++ b/.github/workflows/deploy-lesspass-render-password-package.yml @@ -0,0 +1,29 @@ +name: deploy-lesspass-render-password-package + +on: + push: + paths: + - "packages/lesspass-render-password/**" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: test lesspass-render-password package + run: | + yarn install + yarn workspace lesspass-render-password run test + + deploy: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - name: deploy lesspass-render-password package + run: | + cd packages + ./deploy lesspass-render-password + continue-on-error: true + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy-packages.yml b/.github/workflows/deploy-packages.yml deleted file mode 100644 index a538bc8..0000000 --- a/.github/workflows/deploy-packages.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: deploy-packages - -on: - push: - paths: - - "packages/**" - -jobs: - test-packages: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: test packages - run: | - yarn install - yarn test - - deploy-packages: - runs-on: ubuntu-latest - needs: test-packages - steps: - - uses: actions/checkout@v2 - - name: deploy packages - run: | - cd packages - ./deploy - continue-on-error: true - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/packages/deploy b/packages/deploy index 4824d6b..87ee158 100755 --- a/packages/deploy +++ b/packages/deploy @@ -1,24 +1,21 @@ #!/usr/bin/env bash -function check_env_variables_are_setted { - if [ -z "${NPM_TOKEN}" ]; then - echo "Need to set NPM_TOKEN env variable to release node modules" - exit 1 - fi -} +if [ -z "${NPM_TOKEN}" ]; then + echo "Need to set NPM_TOKEN env variable to release node modules" + exit 1 +fi -check_env_variables_are_setted +if [ $# -eq 0 ]; then + echo "No arguments provided" + exit 1 +fi -function push_packages_on_npm { - touch ~/.npmrc - grep --fixed-strings --line-regexp --silent "//registry.npmjs.org/:_authToken=$NPM_TOKEN" ~/.npmrc || echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc - projects="lesspass lesspass-crypto lesspass-entropy lesspass-fingerprint lesspass-pure lesspass-render-password" - for project in ${projects} - do - pushd ${project} - yarn publish --non-interactive - popd - done -} - -push_packages_on_npm \ No newline at end of file +touch ~/.npmrc +grep --fixed-strings --line-regexp --silent "//registry.npmjs.org/:_authToken=$NPM_TOKEN" ~/.npmrc || echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc +for project in $@ +do + pushd ${project} + yarn publish --non-interactive + pwd + popd +done \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 5e70438..e41ef94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8991,6 +8991,31 @@ lesspass-fingerprint@9.0.0: dependencies: lesspass-crypto "9.0.0" +lesspass-pure@9.1.9: + version "9.1.9" + resolved "https://registry.yarnpkg.com/lesspass-pure/-/lesspass-pure-9.1.9.tgz#c261db79b9c80665e96dc537d18481cf6d76cb99" + integrity sha512-aa87QKbeEYSzyEzeBPT99BpHhCFQNCfC9UBNxGrftQEwWyed/S7CaWpg+IzSX7BCmiyvPPyEtm/DDeSFCE1cbg== + dependencies: + "@oslab/atob" "^0.1.0" + "@oslab/btoa" "^0.1.0" + awesomplete "^1.1.5" + axios "^0.19.0" + balloon-css "^1.0.3" + bootstrap "^4.3.1" + copy-text-to-clipboard "^2.1.1" + core-js "^3.1.2" + font-awesome "^4.7.0" + jwt-decode "^2.2.0" + lesspass "^9.0.0" + lodash "^4.17.15" + vue "^2.6.10" + vue-polyglot "^2.0.1" + vue-router "^3.1.3" + vuejs-paginate "^2.1.0" + vuex "^3.1.1" + vuex-persistedstate "^2.5.4" + vuex-router-sync "^5.0.0" + lesspass-pure@latest: version "9.0.0" resolved "https://registry.yarnpkg.com/lesspass-pure/-/lesspass-pure-9.0.0.tgz#33030839e3bce7acc782a8cb8204152e2a29fd1d"