From d865f71783ec438304b35bf144aeefb814b15321 Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Mon, 12 Feb 2024 22:41:56 -0300 Subject: [PATCH 1/3] docs(evns): add environments in readme and sample description too --- README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7ea9878..5dba36c 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,11 @@ module.exports = ({ env }) => ({ accountKey: env("STORAGE_ACCOUNT_KEY"), sasToken: env("STORAGE_ACCOUNT_SAS_TOKEN"), serviceBaseURL: env("STORAGE_URL"), + cdnBaseURL: env("STORAGE_CDN_URL"), containerName: env("STORAGE_CONTAINER_NAME", "myPrivateContainer"), - defaultPath: "assets", - createContainerIfNotExists: false, - blobLinkExpirationTime: env("STORAGE_SIGNED_URL_EXPIRES_TIME", 24), // time of expiration sign urls in hours + defaultPath: env("STORAGE_DEFAULT_PATH","assets"), + createContainerIfNotExists: ('STORAGE_CREATE_CONTAINER_NOT_EXISTES' ,false), + blobLinkExpirationTime: env("STORAGE_SIGNED_URL_EXPIRES_TIME", 24), uploadOptions: { bufferSize: env("STORAGE_BUFFER_SIZE"), maxConcurrency: env("STORAGE_MAX_CONCURRENCY", 10), @@ -92,3 +93,19 @@ export default [ // ... ]; ``` + +## Environments + + ```bash + STORAGE_ACCOUNT=your_storage_account <"without .blob.core.windows.net"> + STORAGE_ACCOUNT_KEY=your_storage_account_key + STORAGE_ACCOUNT_SAS_TOKEN=your_storage_account_sas_token + STORAGE_URL=your_storage_url <"without .blob.core.windows.net"> + STORAGE_CDN_URL=your_cdn_url <"optional"> + STORAGE_CONTAINER_NAME=your_container_name + STORAGE_DEFAULT_PATH=your_default_path <"default assets"> + STORAGE_SIGNED_URL_EXPIRES_TIME=your_signed_url_expires_time <"default 1"> + STORAGE_BUFFER_SIZE=your_buffer_size <"default (4*1024*1024)4mb"> + STORAGE_MAX_CONCURRENCY=your_max_concurrency <"default 20"> + STORAGE_CREATE_CONTAINER_NOT_EXISTES=boolean_if_create_container_not_exists <"default false"> + ``` From 98a872c2daead8d8ffdf5f5dc661ddc8a87a27de Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Mon, 12 Feb 2024 23:05:03 -0300 Subject: [PATCH 2/3] ci(pipes): add workflow to gen release --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..932b773 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Generate Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Install dependencies + run: npm install + + - name: Bump version and create release + id: create_release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + draft: false + prerelease: false From 87d8c0be3112041ba3dc881c651f1af7244eb14f Mon Sep 17 00:00:00 2001 From: Bruno Marques Date: Mon, 12 Feb 2024 23:07:57 -0300 Subject: [PATCH 3/3] 0.2.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bdcfede..b0320db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "azure-storage-provider-strapi", - "version": "0.2.2", + "version": "0.2.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "azure-storage-provider-strapi", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "dependencies": { "@azure/storage-blob": "^12.17.0", diff --git a/package.json b/package.json index 554a54d..0f5d1a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "azure-storage-provider-strapi", - "version": "0.2.2", + "version": "0.2.3", "description": "lib of upload files to blob storage private", "main": "lib/main.js", "source": "src/main.ts",