From 8b6ad98ced07956ac469bf597f2a9319d6e9cdf3 Mon Sep 17 00:00:00 2001 From: Tony Csernok <92568895+csernokn123@users.noreply.github.com> Date: Mon, 4 Mar 2024 14:06:19 +0100 Subject: [PATCH 01/10] Add initial gh workflow --- .github/workflows/main.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f875d25 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +name: Functionly build and publish + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + - name: Set up Docker + uses: docker/setup-buildx-action@v1 + - name: Build and Test with Coverage + run: | + docker run --rm \ + -e PROPERTIES="BUILD_ID:${{ github.run_number }}" \ + -w "/app" \ + -v $PWD:/app \ + node:8 bash -c "\ + npm i --no-save -q; \ + npm run build; \ + npm run coverage -- --reporter mocha-junit-reporter; \ + chown -R $(id -u):$(id -g) ." From 2a35d5899fc3392c17dadbf7cd802b0366926f21 Mon Sep 17 00:00:00 2001 From: Tony Csernok <92568895+csernokn123@users.noreply.github.com> Date: Mon, 4 Mar 2024 14:10:11 +0100 Subject: [PATCH 02/10] Fix: Docker command format in gha workflow --- .github/workflows/main.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f875d25..5977d3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,11 +15,8 @@ jobs: - name: Build and Test with Coverage run: | docker run --rm \ - -e PROPERTIES="BUILD_ID:${{ github.run_number }}" \ - -w "/app" \ - -v $PWD:/app \ - node:8 bash -c "\ - npm i --no-save -q; \ - npm run build; \ - npm run coverage -- --reporter mocha-junit-reporter; \ - chown -R $(id -u):$(id -g) ." + -e PROPERTIES="BUILD_ID:${{ github.run_number }}" \ + -w "/app" \ + -v $PWD:/app \ + node:8 bash -c "npm i --no-save -q; npm run build; npm run coverage -- --reporter mocha-junit-reporter; chown -R $(id -u):$(id -g) ." + From 654bfbd34c6cc0c46b73266535e2aba546e044f7 Mon Sep 17 00:00:00 2001 From: Tony Csernok <92568895+csernokn123@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:04:23 +0100 Subject: [PATCH 03/10] Update main.yml Update: gha workflow with npm publish step --- .github/workflows/main.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5977d3f..15d0356 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,4 +19,17 @@ jobs: -w "/app" \ -v $PWD:/app \ node:8 bash -c "npm i --no-save -q; npm run build; npm run coverage -- --reporter mocha-junit-reporter; chown -R $(id -u):$(id -g) ." - + - name: Setup .npmrc + run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Build, Version, and Publish to npm using Docker + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_VERSION: '1.0.0' + run: | + docker run --rm \ + -w "/app" \ + -v $PWD:/app \ + -v ${{ github.workspace }}/.npmrc:/root/.npmrc \ + node:16 bash -c "npm i --no-save -q; npm run build; npm version ${NPM_VERSION} > version.txt; npm publish --tag dev; chown -R $(id -u):$(id -g) ." From 2ad8dfd8bf6cfefe01a8fa998b6f74cfcb25ead1 Mon Sep 17 00:00:00 2001 From: Tony Csernok <92568895+csernokn123@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:13:50 +0100 Subject: [PATCH 04/10] Fix: docker command format in the npm publish step --- .github/workflows/main.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15d0356..9b85be5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,13 +23,12 @@ jobs: run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Build, Version, and Publish to npm using Docker + - name: Build and Publish to npmjs env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_VERSION: '1.0.0' + NPM_VERSION: '1.0.0' run: | docker run --rm \ -w "/app" \ - -v $PWD:/app \ - -v ${{ github.workspace }}/.npmrc:/root/.npmrc \ - node:16 bash -c "npm i --no-save -q; npm run build; npm version ${NPM_VERSION} > version.txt; npm publish --tag dev; chown -R $(id -u):$(id -g) ." + -v "$PWD:/app" \ + -v "${{ github.workspace }}/.npmrc:/root/.npmrc" \ + node:8 bash -c "npm i --no-save -q; npm run build; npm version ${NPM_VERSION} > version.txt; npm publish --tag dev; chown -R $(id -u):$(id -g) ." From e7df39c220c808c37268e6e133aa4de9c19c7abd Mon Sep 17 00:00:00 2001 From: Imre Kiss Date: Mon, 4 Mar 2024 16:39:23 +0100 Subject: [PATCH 05/10] fix: remove the aws-sdk extrenals config --- src/cli/context/steppes/codeCompile.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cli/context/steppes/codeCompile.ts b/src/cli/context/steppes/codeCompile.ts index 347f261..f81d81f 100644 --- a/src/cli/context/steppes/codeCompile.ts +++ b/src/cli/context/steppes/codeCompile.ts @@ -110,9 +110,6 @@ export const bundleConfig = ExecuteStep.register('WebpackBundleConfig', async (c }) const externals = {} - if (context.deployTarget === 'aws') { - externals['aws-sdk'] = 'commonjs aws-sdk' - } let compile = {} if (projectConfig.compile) { @@ -183,4 +180,4 @@ export const watchConfig = ExecuteStep.register('WebpackWatchConfig', (context) ignored: /dist/ } } -}) \ No newline at end of file +}) From 16f0ac384160f67e58419087a026e659cebc2caf Mon Sep 17 00:00:00 2001 From: Tony Csernok <92568895+csernokn123@users.noreply.github.com> Date: Mon, 4 Mar 2024 16:46:03 +0100 Subject: [PATCH 06/10] 0.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a09cf8..5412099 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "functionly", - "version": "0.5.0", + "version": "0.6.0", "description": "", "main": "lib/src/index", "types": "lib/src/index.d.ts", From fff64ce6c61543f05bb96879ddfe8d0cb4e2c4fd Mon Sep 17 00:00:00 2001 From: Norbert Csernok Date: Mon, 4 Mar 2024 21:34:17 +0100 Subject: [PATCH 07/10] Add: refactor gha workflow --- .github/workflows/main.yml | 114 ++++++++++++++++++++++++++++++------- 1 file changed, 95 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b85be5..b90a48f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,31 +4,107 @@ on: workflow_dispatch: jobs: - build: + dev: runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@v3 - - name: Set up Docker - uses: docker/setup-buildx-action@v1 - - name: Build and Test with Coverage - run: | - docker run --rm \ - -e PROPERTIES="BUILD_ID:${{ github.run_number }}" \ - -w "/app" \ - -v $PWD:/app \ - node:8 bash -c "npm i --no-save -q; npm run build; npm run coverage -- --reporter mocha-junit-reporter; chown -R $(id -u):$(id -g) ." - - name: Setup .npmrc - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '8' + - name: Install dependencies + run: npm i --no-save -q + - name: Setup .npmrc for npmjs + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Build and Publish to npmjs + - name: Auto Increment Version, and Publish to npmjs + run: | + git config --global user.email "jaystack-ci@jaystack.com" + git config --global user.name "jaystack-ci" + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + npm version patch -m "Auto-increment version: %s" --force + npm publish --tag dev + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Git operations + run: | + git tag -f dev + git push -f --tags + git push + stage: + needs: dev + runs-on: ubuntu-latest + environment: stage + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + with: + ref: 'refs/tags/dev' + + - name: Configure npm + run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Extract package version + id: package_version + run: echo "::set-output name=VERSION::$(jq -r .version package.json)" + shell: bash + + - name: Configure Git + run: | + git config --global user.email "jaystack-ci@jaystack.com" + git config --global user.name "jaystack-ci" + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + + - name: Create and push git tag + run: | + git tag -f stage + git push -f --tags + + - name: Publish to npm + run: npm dist-tag add functionly@${{ steps.package_version.outputs.VERSION }} stage + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + live: + needs: stage + runs-on: ubuntu-latest + environment: live + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + with: + ref: 'refs/tags/stage' + + - name: Configure npm + run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc env: - NPM_VERSION: '1.0.0' + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Extract package version + id: package_version + run: echo "::set-output name=VERSION::$(jq -r .version package.json)" + shell: bash + + - name: Configure Git + run: | + git config --global user.email "jaystack-ci@jaystack.com" + git config --global user.name "jaystack-ci" + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + + - name: Create and push git tag run: | - docker run --rm \ - -w "/app" \ - -v "$PWD:/app" \ - -v "${{ github.workspace }}/.npmrc:/root/.npmrc" \ - node:8 bash -c "npm i --no-save -q; npm run build; npm version ${NPM_VERSION} > version.txt; npm publish --tag dev; chown -R $(id -u):$(id -g) ." + git tag -f latest + git push -f --tags + + - name: Publish to npm + run: npm dist-tag add functionly@${{ steps.package_version.outputs.VERSION }} latest + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + From 82bc369624aa4489c2d7159d275440d0837d667e Mon Sep 17 00:00:00 2001 From: Norbert Csernok Date: Mon, 4 Mar 2024 21:38:59 +0100 Subject: [PATCH 08/10] Chore: update package version manually in the package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5412099..b2551e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "functionly", - "version": "0.6.0", + "version": "0.6.1", "description": "", "main": "lib/src/index", "types": "lib/src/index.d.ts", From 408f2da212d3dfe0b79c6502b2d8dd3bb9708ede Mon Sep 17 00:00:00 2001 From: jaystack-ci Date: Mon, 4 Mar 2024 20:39:31 +0000 Subject: [PATCH 09/10] Auto-increment version: 0.6.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2b16a08..075f6af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "functionly", - "version": "0.5.0", + "version": "0.6.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index b2551e8..191042d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "functionly", - "version": "0.6.1", + "version": "0.6.2", "description": "", "main": "lib/src/index", "types": "lib/src/index.d.ts", From 498ac3c3618509e09be3c166393520de246ba113 Mon Sep 17 00:00:00 2001 From: jaystack-ci Date: Mon, 26 May 2025 11:53:11 +0000 Subject: [PATCH 10/10] Auto-increment version: 0.6.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 075f6af..a9a6296 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "functionly", - "version": "0.6.2", + "version": "0.6.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 191042d..7f3b876 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "functionly", - "version": "0.6.2", + "version": "0.6.3", "description": "", "main": "lib/src/index", "types": "lib/src/index.d.ts",