Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
iferreira committed Sep 10, 2024
2 parents 91cf8b0 + 0cca7bf commit 33022da
Show file tree
Hide file tree
Showing 18 changed files with 2,676 additions and 21,704 deletions.
108 changes: 107 additions & 1 deletion .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
name: VSF Continuous Delivery

on:
Expand All @@ -10,4 +11,109 @@ jobs:
release-packages:
name: "Release NPM Packages"
uses: vuestorefront/integrations-github-workflows/.github/workflows/continuous-delivery.yml@develop
secrets: inherit
secrets: inherit
=======
name: Release

on:
workflow_call:
secrets:
NPM_USER:
description: "repository NPM_USER secret passed on"
required: false
NPM_PASS:
description: "repository NPM_PASS secret passed on"
required: false
NPM_EMAIL:
description: "repository NPM_EMAIL secret passed on"
required: false
inputs:
enterprise:
description: "Flag to use enterprise registry"
type: boolean
required: false
default: false

defaults:
run:
shell: bash

env:
GCP_PROJECT_ID: 81559754996
GCP_PROJECT_NAME: sf-artifacts-prod

jobs:
changelog:
name: Changelog PR or Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write

steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'

- if: ${{ inputs.enterprise }}
id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
workload_identity_provider: projects/${{ env.GCP_PROJECT_ID }}/locations/global/workloadIdentityPools/sf-artifacts-prod-01/providers/sf-artifacts-prod-01
service_account: workload-identity-federation@sf-artifacts-prod.iam.gserviceaccount.com
token_format: access_token
# The credentials file is created in repo root as an untracked file in Git
# Changesets commits all files in the repo root when creating an automated bot PR
# This causes plaintext credentials to show up in automated PRs
# So let's not create this file at all
create_credentials_file: false

- if: ${{ inputs.enterprise }}
name: Set Artifact Registry & Verdaccio tokens
run: |
# set token for Artifact Registry
npm config set //europe-west1-npm.pkg.dev/${{ env.GCP_PROJECT_NAME }}/npm/:_authToken=${{ steps.auth.outputs.access_token }}
# set token for Verdaccio
npx npm-cli-login -u ${{ secrets.NPM_USER }} -p ${{ secrets.NPM_PASS }} -e ${{ secrets.NPM_EMAIL }} -r https://registrynpm.storefrontcloud.io
- if: ${{ !inputs.enterprise }}
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }}

- name: Install dependencies
run: HUSKY=0 yarn --frozen-lockfile

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
commit: "ci: release"
title: "ci: release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ (inputs.enterprise == true) && (steps.changesets.outputs.hasChangesets == 'false') }}
name: Publish in Artifact Registry
run: |
yarn build && \
npm config --location project set @vsf-enterprise:registry=https://europe-west1-npm.pkg.dev/${{ env.GCP_PROJECT_NAME }}/npm/ && \
yarn changeset publish
# Remove this step once Verdaccio is removed by the Cloud Team for good.
# It's possible to use `continue-on-error: true` here for max futureproofing,
# but this also makes publishing failures show as successful despite errors, so I didn't do that
- if: ${{ (inputs.enterprise == true) && (steps.changesets.outputs.hasChangesets == 'false') }}
name: Publish in Verdaccio
run: |
npm config --location project set @vsf-enterprise:registry=https://registrynpm.storefrontcloud.io/ && \
yarn changeset publish
- if: ${{ (inputs.enterprise == false) && (steps.changesets.outputs.hasChangesets == 'false') }}
name: Publish
run: yarn build && yarn changeset publish
>>>>>>> origin/main
16 changes: 16 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,33 @@ on:
workflow_call:
inputs:
enterprise:
<<<<<<< HEAD
description: 'Flag to use enterprise registry'
=======
description: "Flag to use enterprise registry"
>>>>>>> origin/main
type: boolean
required: false
default: false

node_version:
<<<<<<< HEAD
description: 'Node versions to test'
=======
description: "Node versions to test"
>>>>>>> origin/main
type: string
required: false
default: "['16']"

defaults:
run:
shell: bash
<<<<<<< HEAD

=======

>>>>>>> origin/main
env:
GCP_PROJECT_ID: 81559754996
GCP_PROJECT_NAME: sf-artifacts-prod
Expand Down Expand Up @@ -108,4 +120,8 @@ jobs:
packages/**/coverage
- name: Lint project
<<<<<<< HEAD
run: yarn lint
=======
run: yarn lint
>>>>>>> origin/main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ coverage
# service workers
sw.*

build-docs-dd.sh
23 changes: 0 additions & 23 deletions .vuestorefrontcloud/docker/docs/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions .vuestorefrontcloud/docker/docs/build-docker.sh

This file was deleted.

1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @vuestorefront-community/vsfcloud
7 changes: 7 additions & 0 deletions docs/.gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
pids
logs
node_modules
Expand All @@ -11,3 +12,9 @@ dist
config.local.js
basement_dist
.nuxt
=======
.vuepress/dist
.vuepress/public/commercetools
api.json
reference
>>>>>>> origin/main
22 changes: 0 additions & 22 deletions docs/README.md

This file was deleted.

24 changes: 16 additions & 8 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"name": "@vuestorefront/docs-example",
"version": "1.0.0",
"private": true,
"name": "vuestorefront-odoo-api-docs",
"version": "2.0.0",
"description": "This project is a Odoo integration documentation",
"main": "index.js",
"authors": {
"name": "Ivan Ferreira",
"email": "iferreira@odoogap.com"
},
"repository": "https://github.com/vuestorefront-community/odoo",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
Expand All @@ -18,11 +24,13 @@
},
"devDependencies": {
"@microsoft/api-documenter": "^7.13.30",
"@microsoft/api-extractor": "^7.18.1",
"@types/node": "^18",
"nuxt": "^3.12.4",
"nuxt-gtag": "^1.1.2"
},
"@microsoft/api-extractor": "7.18.1",
"concat-md": "^0.3.5",
"handlebars": "^4.7.7",
"typedoc": "^0.20.20",
"typedoc-plugin-markdown": "^3.4.5",
"typescript": "^3.6.4"
},
"dependencies": {
"@stackblitz/sdk": "^1.9.0",
"sf-docs-base": "latest"
Expand Down
Loading

0 comments on commit 33022da

Please sign in to comment.