From 78f450c6ac6d2f8c5c13d297a8d713d5a53f983d Mon Sep 17 00:00:00 2001 From: Martin M Date: Wed, 20 Dec 2023 16:08:49 +0100 Subject: [PATCH 1/3] Update setTag.yml --- .github/workflows/setTag.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/setTag.yml b/.github/workflows/setTag.yml index 9851f33a9..45c7230fb 100644 --- a/.github/workflows/setTag.yml +++ b/.github/workflows/setTag.yml @@ -4,30 +4,27 @@ name: Set tag on: workflow_dispatch: inputs: - action: + tag: type: choice - description: action to perform + description: select tag to set options: - - closeIssue - - reopenIssue + - latest + - next + - stable required: true - repository: + adapter: type: string - issue: + required: true + release: type: string + required: true jobs: set-tag: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 18 - - run: npm i - - run: npm run setTag - env: - OWN_GITHUB_TOKEN: ${{ secrets.OWN_GITHUB_TOKEN }} - ACTION: ${{ github.event.inputs.action }} - REPOSITORY: ${{ github.event.inputs.repository }} - ISSUE: ${{ github.event.inputs.issue }} + - run: npm dist-tag list iobroker.webui + - run: npm --//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}} dist-tag add iobroker.${{ github.event.inputs.adapter }}@${{ github.event.inputs.release }} ${{ github.event.inputs.tag }} From b64edb15b0607faf9fbab7a2d41912ee1359a863 Mon Sep 17 00:00:00 2001 From: Martin M Date: Wed, 20 Dec 2023 16:27:00 +0100 Subject: [PATCH 2/3] Update setTag.yml --- .github/workflows/setTag.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/setTag.yml b/.github/workflows/setTag.yml index 45c7230fb..5e1c319e3 100644 --- a/.github/workflows/setTag.yml +++ b/.github/workflows/setTag.yml @@ -23,8 +23,20 @@ jobs: set-tag: runs-on: ubuntu-latest steps: +# - uses: actions/setup-node@v4 +# with: +# node-version: 18 +# - run: npm dist-tag list iobroker.webui +# - run: npm --//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}} dist-tag add iobroker.${{ github.event.inputs.adapter }}@${{ github.event.inputs.release }} ${{ github.event.inputs.tag }} + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 18 - - run: npm dist-tag list iobroker.webui - - run: npm --//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}} dist-tag add iobroker.${{ github.event.inputs.adapter }}@${{ github.event.inputs.release }} ${{ github.event.inputs.tag }} + - run: npm i + - run: npm run setTag + env: + OWN_GITHUB_TOKEN: ${{ secrets.OWN_GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + INPUT_ADAPTER: ${{ github.event.inputs.adapter }} + INPUT_RELEASE: ${{ github.event.inputs.release }} + INPUT_TAG: ${{ github.event.inputs.tag }} From 68b846914194e617918a940dc1346e84f2abce50 Mon Sep 17 00:00:00 2001 From: Martin M Date: Wed, 20 Dec 2023 16:31:17 +0100 Subject: [PATCH 3/3] Update setTag.js --- lib/setTag.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/setTag.js b/lib/setTag.js index 96eddf16c..d6a199644 100644 --- a/lib/setTag.js +++ b/lib/setTag.js @@ -38,10 +38,10 @@ async function doIt() { const cmd = `npm --//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN} dist-tag add iobroker.${process.env.INPUT_ADAPTER}@${targetRelease} ${process.env.INPUT_TAG}`; try { const result=execSync( cmd, { encoding: 'utf-8' }); -// console.log(result); -// } catch (_e) { -// // console.log (JSON.stringify(e)); -// } + console.log(result); + } catch (_e) { + // console.log (JSON.stringify(e)); + } } return 'done';