From 529ea01bd90fd6dae2a66313374731e73bcda504 Mon Sep 17 00:00:00 2001 From: Gabriel Martinez Date: Sat, 23 Sep 2023 10:46:29 -0500 Subject: [PATCH 1/3] Create release-client-js.yml feat: created action for client-js release --- .github/workflows/release-client-js.yml | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release-client-js.yml diff --git a/.github/workflows/release-client-js.yml b/.github/workflows/release-client-js.yml new file mode 100644 index 0000000..f5b17c4 --- /dev/null +++ b/.github/workflows/release-client-js.yml @@ -0,0 +1,29 @@ +name: Deploy Async DataFlow channel sender JS client + +on: + release: + types: [published] +jobs: + build: + defaults: + run: + working-directory: clients/client-js + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v1 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - uses: actions/setup-node@v1 + with: + registry-url: 'https://npm.pkg.github.com' + scope: 'chanjs-client' + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c8a69528c868b09f1237288fd0868741936337de Mon Sep 17 00:00:00 2001 From: Gabriel Martinez Date: Mon, 25 Sep 2023 08:40:13 -0500 Subject: [PATCH 2/3] fix: tools versions and org scope fixed org scope for publishing in github packages and upgrade tools versions --- .github/workflows/release-client-js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-client-js.yml b/.github/workflows/release-client-js.yml index f5b17c4..8c19b61 100644 --- a/.github/workflows/release-client-js.yml +++ b/.github/workflows/release-client-js.yml @@ -10,9 +10,9 @@ jobs: working-directory: clients/client-js runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: node-version: '18.x' registry-url: 'https://registry.npmjs.org' @@ -20,10 +20,10 @@ jobs: - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: registry-url: 'https://npm.pkg.github.com' - scope: 'chanjs-client' + scope: '@bancolombia' - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ef68116964128e89b795ce5d31dbaa128f0d92b2 Mon Sep 17 00:00:00 2001 From: Gabriel Martinez Date: Mon, 25 Sep 2023 10:47:12 -0500 Subject: [PATCH 3/3] feat: setup trigger by tag name setup trigger only on pushing a tag with certain prefix --- .github/workflows/release-client-js.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-client-js.yml b/.github/workflows/release-client-js.yml index 8c19b61..0da5a62 100644 --- a/.github/workflows/release-client-js.yml +++ b/.github/workflows/release-client-js.yml @@ -1,8 +1,9 @@ name: Deploy Async DataFlow channel sender JS client on: - release: - types: [published] + push: + tags: + - 'chanjs_*' # Push events to matching chanjs_*, i.e. chanjs_0.2.0 jobs: build: defaults: