diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e2b9995..55b5ae7 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -25,10 +25,10 @@ jobs: - name: git checkout uses: actions/checkout@v4 - - name: Use Node.js 20.x + - name: Use Node.js 22.x uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' registry-url: 'https://registry.npmjs.org' cache: 'npm' diff --git a/scripts/tag.js b/scripts/tag.js index 01fc4d1..fc1703d 100755 --- a/scripts/tag.js +++ b/scripts/tag.js @@ -15,6 +15,7 @@ 'use strict'; +const fs = require('fs'); const semver = require('semver'); const targetVersion = process.argv[2]; @@ -26,4 +27,10 @@ if (!semver.valid(targetVersion)) { const prerelease = semver.prerelease(targetVersion); const tag = prerelease ? 'unstable' : 'latest'; -console.log(`::set-output name=tag::--tag=${tag}`); +const output = `--tag=${tag}`; +if (process.env.GITHUB_OUTPUT) { + fs.appendFileSync(process.env.GITHUB_OUTPUT, `tag=${output} +`); +} else { + console.log(output); +}