From bf2f02c4a72c68dc76c6a3d8af0581bb9bf4abe9 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Fri, 18 Nov 2022 09:33:59 +0100 Subject: [PATCH 1/5] Pass the token input through on GHES for Microsoft Build of OpenJDK (#395) --- action.yml | 4 ++-- dist/setup/index.js | 3 ++- docs/advanced-usage.md | 16 ++++++++++++++++ src/distributions/microsoft/installer.ts | 3 ++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 3ace2c66..f67c642d 100644 --- a/action.yml +++ b/action.yml @@ -59,8 +59,8 @@ inputs: description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting' default: ${{ job.status }} token: - description: Used to pull java versions from setup-java. Since there is a default value, token is typically not supplied by the user. - default: ${{ github.token }} + description: The token used to authenticate when fetching version manifests hosted on github.com, such as for the Microsoft Build of OpenJDK. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. + default: ${{ github.server_url == 'https://github.com' && github.token || '' }} mvn-toolchain-id: description: 'Name of Maven Toolchain ID if the default name of "${distribution}_${java-version}" is not wanted. See examples of supported syntax in Advanced Usage file' required: false diff --git a/dist/setup/index.js b/dist/setup/index.js index 2820ec37..8159433a 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -104539,6 +104539,7 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { // TODO get these dynamically! // We will need Microsoft to add an endpoint where we can query for versions. const token = core.getInput('token'); + const auth = !token ? undefined : `token ${token}`; const owner = 'actions'; const repository = 'setup-java'; const branch = 'main'; @@ -104546,7 +104547,7 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { let releases = null; const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; const headers = { - authorization: token, + authorization: auth, accept: 'application/vnd.github.VERSION.raw' }; let response = null; diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 93ebd854..3440dffb 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -80,6 +80,22 @@ steps: - run: java -cp java HelloWorldApp ``` +### Using Microsoft distribution on GHES + +`setup-java` comes pre-installed on the appliance with GHES if Actions is enabled. When dynamically downloading the Microsoft Build of OpenJDK distribution, `setup-java` makes a request to `actions/setup-java` to get available versions on github.com (outside of the appliance). These calls to `actions/setup-java` are made via unauthenticated requests, which are limited to [60 requests per hour per IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting). If more requests are made within the time frame, then you will start to see rate-limit errors during downloading that looks like: `##[error]API rate limit exceeded for...`. + +To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action: + +```yaml +uses: actions/setup-java@v3 +with: + token: ${{ secrets.GH_DOTCOM_TOKEN }} + distribution: 'microsoft' + java-version: '11' +``` + +If the runner is not able to access github.com, any Java versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information. + ### Amazon Corretto **NOTE:** Amazon Corretto only supports the major version specification. diff --git a/src/distributions/microsoft/installer.ts b/src/distributions/microsoft/installer.ts index 6284f961..6929fb2e 100644 --- a/src/distributions/microsoft/installer.ts +++ b/src/distributions/microsoft/installer.ts @@ -73,6 +73,7 @@ export class MicrosoftDistributions extends JavaBase { // TODO get these dynamically! // We will need Microsoft to add an endpoint where we can query for versions. const token = core.getInput('token'); + const auth = !token ? undefined : `token ${token}`; const owner = 'actions'; const repository = 'setup-java'; const branch = 'main'; @@ -82,7 +83,7 @@ export class MicrosoftDistributions extends JavaBase { const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; const headers: OutgoingHttpHeaders = { - authorization: token, + authorization: auth, accept: 'application/vnd.github.VERSION.raw' }; From 7db6b4554ccf39e07c23296b2b1ab614f2c2351c Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Fri, 18 Nov 2022 09:35:24 +0100 Subject: [PATCH 2/5] Eclipse Temurin instead of Adopt OpenJDK (#398) --- docs/advanced-usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 3440dffb..58f6bc57 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -364,7 +364,7 @@ See the help docs on [Publishing a Package with Gradle](https://help.github.com/ ## Hosted Tool Cache GitHub Hosted Runners have a tool cache that comes with some Java versions pre-installed. This tool cache helps speed up runs and tool setup by not requiring any new downloads. There is an environment variable called `RUNNER_TOOL_CACHE` on each runner that describes the location of this tools cache and this is where you can find the pre-installed versions of Java. `setup-java` works by taking a specific version of Java in this tool cache and adding it to PATH if the version, architecture and distribution match. -Currently, LTS versions of Adopt OpenJDK (`adopt`) are cached on the GitHub Hosted Runners. +Currently, LTS versions of Eclipse Temurin (`temurin`) are cached on the GitHub Hosted Runners. The tools cache gets updated on a weekly basis. For information regarding locally cached versions of Java on GitHub hosted runners, check out [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments). From 6cdf39a6b6d2b0dd01e76d547cb9d448ccdd4f7c Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 23 Nov 2022 13:28:51 +0100 Subject: [PATCH 3/5] Add support for Oracle JDK (#401) --- .github/workflows/e2e-versions.yml | 14 ++ README.md | 1 + .../distributors/oracle-installer.test.ts | 97 ++++++++++++++ __tests__/verify-java.sh | 2 +- dist/setup/index.js | 123 ++++++++++++++++++ docs/advanced-usage.md | 14 ++ src/distributions/distribution-factory.ts | 6 +- src/distributions/oracle/installer.ts | 103 +++++++++++++++ src/distributions/oracle/models.ts | 1 + 9 files changed, 359 insertions(+), 2 deletions(-) create mode 100644 __tests__/distributors/oracle-installer.test.ts create mode 100644 src/distributions/oracle/installer.ts create mode 100644 src/distributions/oracle/models.ts diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index b0454f3e..449cbe52 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -25,6 +25,16 @@ jobs: exclude: - distribution: microsoft version: 8 + include: + - distribution: oracle + os: macos-latest + version: 17 + - distribution: oracle + os: windows-latest + version: 19 + - distribution: oracle + os: ubuntu-latest + version: 19 steps: - name: Checkout uses: actions/checkout@v3 @@ -51,6 +61,10 @@ jobs: - '11.0' - '8.0.302' - '16.0.2+7' + include: + - distribution: oracle + os: ubuntu-latest + version: '19.0.1' steps: - name: Checkout uses: actions/checkout@v3 diff --git a/README.md b/README.md index 4c19157d..dcf6f124 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ Currently, the following distributions are supported: | `liberica` | Liberica JDK | [Link](https://bell-sw.com/) | [Link](https://bell-sw.com/liberica_eula/) | | `microsoft` | Microsoft Build of OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/java/openjdk/faq) | `corretto` | Amazon Corretto Build of OpenJDK | [Link](https://aws.amazon.com/corretto/) | [Link](https://aws.amazon.com/corretto/faqs/) +| `oracle` | Oracle JDK | [Link](https://www.oracle.com/java/technologies/downloads/) | [Link](https://java.com/freeuselicense) **NOTE:** The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions. diff --git a/__tests__/distributors/oracle-installer.test.ts b/__tests__/distributors/oracle-installer.test.ts new file mode 100644 index 00000000..86cba920 --- /dev/null +++ b/__tests__/distributors/oracle-installer.test.ts @@ -0,0 +1,97 @@ +import { OracleDistribution } from '../../src/distributions/oracle/installer'; +import os from 'os'; +import * as core from '@actions/core'; +import { getDownloadArchiveExtension } from '../../src/util'; + +describe('findPackageForDownload', () => { + let distribution: OracleDistribution; + let spyDebug: jest.SpyInstance; + + beforeEach(() => { + distribution = new OracleDistribution({ + version: '', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + + spyDebug = jest.spyOn(core, 'debug'); + spyDebug.mockImplementation(() => {}); + }); + + it.each([ + [ + '19', + '19', + 'https://download.oracle.com/java/19/latest/jdk-19_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '19.0.1', + '19.0.1', + 'https://download.oracle.com/java/19/archive/jdk-19.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '18.0.2.1', + '18.0.2.1', + 'https://download.oracle.com/java/18/archive/jdk-18.0.2.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '17', + '17', + 'https://download.oracle.com/java/17/latest/jdk-17_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '17.0.1', + '17.0.1', + 'https://download.oracle.com/java/17/archive/jdk-17.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ] + ])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => { + const result = await distribution['findPackageForDownload'](input); + expect(result.version).toBe(expectedVersion); + const osType = distribution.getPlatform(); + const archiveType = getDownloadArchiveExtension(); + const url = expectedUrl.replace('{{OS_TYPE}}', osType).replace('{{ARCHIVE_TYPE}}', archiveType); + expect(result.url).toBe(url); + }); + + it.each([ + ['amd64', 'x64'], + ['arm64', 'aarch64'] + ])( + 'defaults to os.arch(): %s mapped to distro arch: %s', + async (osArch: string, distroArch: string) => { + jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest.spyOn(os, 'platform').mockReturnValue('linux'); + + const version = '17'; + const distro = new OracleDistribution({ + version, + architecture: '', // to get default value + packageType: 'jdk', + checkLatest: false + }); + + const osType = distribution.getPlatform(); + if (osType === 'windows' && distroArch == 'aarch64') { + return; // skip, aarch64 is not available for Windows + } + const archiveType = getDownloadArchiveExtension(); + const result = await distro['findPackageForDownload'](version); + const expectedUrl = `https://download.oracle.com/java/17/latest/jdk-17_${osType}-${distroArch}_bin.${archiveType}`; + + expect(result.url).toBe(expectedUrl); + } + ); + + it('should throw an error', async () => { + await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( + /Oracle JDK is only supported for JDK 17 and later/ + ); + await expect(distribution['findPackageForDownload']('11')).rejects.toThrow( + /Oracle JDK is only supported for JDK 17 and later/ + ); + await expect(distribution['findPackageForDownload']('18')).rejects.toThrow( + /Could not find Oracle JDK for SemVer */ + ); + }); +}); diff --git a/__tests__/verify-java.sh b/__tests__/verify-java.sh index 1bad5d35..069d9008 100755 --- a/__tests__/verify-java.sh +++ b/__tests__/verify-java.sh @@ -24,7 +24,7 @@ fi ACTUAL_JAVA_VERSION="$(java -version 2>&1)" echo "Found java version: $ACTUAL_JAVA_VERSION" -GREP_RESULT=$(echo $ACTUAL_JAVA_VERSION | grep "^openjdk version \"$EXPECTED_JAVA_VERSION") +GREP_RESULT=$(echo $ACTUAL_JAVA_VERSION | grep -E "^(openjdk|java) version \"$EXPECTED_JAVA_VERSION") if [ -z "$GREP_RESULT" ]; then echo "::error::Unexpected version" echo "Expected version: $EXPECTED_JAVA_VERSION" diff --git a/dist/setup/index.js b/dist/setup/index.js index 8159433a..e0f5a9bf 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -104133,6 +104133,7 @@ const installer_4 = __nccwpck_require__(8579); const installer_5 = __nccwpck_require__(883); const installer_6 = __nccwpck_require__(3613); const installer_7 = __nccwpck_require__(4750); +const installer_8 = __nccwpck_require__(4298); var JavaDistribution; (function (JavaDistribution) { JavaDistribution["Adopt"] = "adopt"; @@ -104144,6 +104145,7 @@ var JavaDistribution; JavaDistribution["JdkFile"] = "jdkfile"; JavaDistribution["Microsoft"] = "microsoft"; JavaDistribution["Corretto"] = "corretto"; + JavaDistribution["Oracle"] = "oracle"; })(JavaDistribution || (JavaDistribution = {})); function getJavaDistribution(distributionName, installerOptions, jdkFile) { switch (distributionName) { @@ -104164,6 +104166,8 @@ function getJavaDistribution(distributionName, installerOptions, jdkFile) { return new installer_6.MicrosoftDistributions(installerOptions); case JavaDistribution.Corretto: return new installer_7.CorrettoDistribution(installerOptions); + case JavaDistribution.Oracle: + return new installer_8.OracleDistribution(installerOptions); default: return null; } @@ -104571,6 +104575,125 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { exports.MicrosoftDistributions = MicrosoftDistributions; +/***/ }), + +/***/ 4298: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OracleDistribution = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const tc = __importStar(__nccwpck_require__(7784)); +const fs_1 = __importDefault(__nccwpck_require__(7147)); +const path_1 = __importDefault(__nccwpck_require__(1017)); +const base_installer_1 = __nccwpck_require__(9741); +const util_1 = __nccwpck_require__(2629); +const http_client_1 = __nccwpck_require__(9925); +const ORACLE_DL_BASE = 'https://download.oracle.com/java'; +class OracleDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Oracle', installerOptions); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + const javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + let extension = util_1.getDownloadArchiveExtension(); + let extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + let javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + findPackageForDownload(range) { + return __awaiter(this, void 0, void 0, function* () { + const arch = this.distributionArchitecture(); + if (arch !== 'x64' && arch !== 'aarch64') { + throw new Error(`Unsupported architecture: ${this.architecture}`); + } + if (!this.stable) { + throw new Error('Early access versions are not supported'); + } + if (this.packageType !== 'jdk') { + throw new Error('Oracle JDK provides only the `jdk` package type'); + } + const platform = this.getPlatform(); + const extension = util_1.getDownloadArchiveExtension(); + let major; + let fileUrl; + if (range.includes('.')) { + major = range.split('.')[0]; + fileUrl = `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + else { + major = range; + fileUrl = `${ORACLE_DL_BASE}/${range}/latest/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + if (parseInt(major) < 17) { + throw new Error('Oracle JDK is only supported for JDK 17 and later'); + } + const response = yield this.http.head(fileUrl); + if (response.message.statusCode === http_client_1.HttpCodes.NotFound) { + throw new Error(`Could not find Oracle JDK for SemVer ${range}`); + } + if (response.message.statusCode !== http_client_1.HttpCodes.OK) { + throw new Error(`Http request for Oracle JDK failed with status code: ${response.message.statusCode}`); + } + return { url: fileUrl, version: range }; + }); + } + getPlatform(platform = process.platform) { + switch (platform) { + case 'darwin': + return 'macos'; + case 'win32': + return 'windows'; + case 'linux': + return 'linux'; + default: + throw new Error(`Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'`); + } + } +} +exports.OracleDistribution = OracleDistribution; + + /***/ }), /***/ 8579: diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 58f6bc57..6423d06c 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -6,6 +6,7 @@ - [Liberica](#Liberica) - [Microsoft](#Microsoft) - [Amazon Corretto](#Amazon-Corretto) + - [Oracle](#Oracle) - [Installing custom Java package type](#Installing-custom-Java-package-type) - [Installing custom Java architecture](#Installing-custom-Java-architecture) - [Installing custom Java distribution from local file](#Installing-Java-from-local-file) @@ -109,6 +110,19 @@ steps: - run: java -cp java HelloWorldApp ``` +### Oracle +**NOTE:** Oracle Java SE Development Kit is only available for version 17 and later. + +```yaml +steps: +- uses: actions/checkout@v3 +- uses: actions/setup-java@v3 + with: + distribution: 'oracle' + java-version: '17' +- run: java -cp java HelloWorldApp +``` + ## Installing custom Java package type ```yaml steps: diff --git a/src/distributions/distribution-factory.ts b/src/distributions/distribution-factory.ts index 9e14a804..4de93128 100644 --- a/src/distributions/distribution-factory.ts +++ b/src/distributions/distribution-factory.ts @@ -7,6 +7,7 @@ import { TemurinDistribution, TemurinImplementation } from './temurin/installer' import { LibericaDistributions } from './liberica/installer'; import { MicrosoftDistributions } from './microsoft/installer'; import { CorrettoDistribution } from './corretto/installer'; +import { OracleDistribution } from './oracle/installer'; enum JavaDistribution { Adopt = 'adopt', @@ -17,7 +18,8 @@ enum JavaDistribution { Liberica = 'liberica', JdkFile = 'jdkfile', Microsoft = 'microsoft', - Corretto = 'corretto' + Corretto = 'corretto', + Oracle = 'oracle' } export function getJavaDistribution( @@ -43,6 +45,8 @@ export function getJavaDistribution( return new MicrosoftDistributions(installerOptions); case JavaDistribution.Corretto: return new CorrettoDistribution(installerOptions); + case JavaDistribution.Oracle: + return new OracleDistribution(installerOptions); default: return null; } diff --git a/src/distributions/oracle/installer.ts b/src/distributions/oracle/installer.ts new file mode 100644 index 00000000..ed00482f --- /dev/null +++ b/src/distributions/oracle/installer.ts @@ -0,0 +1,103 @@ +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; + +import fs from 'fs'; +import path from 'path'; + +import { JavaBase } from '../base-installer'; +import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from '../base-models'; +import { extractJdkFile, getDownloadArchiveExtension } from '../../util'; +import { HttpCodes } from '@actions/http-client'; + +const ORACLE_DL_BASE = 'https://download.oracle.com/java'; + +export class OracleDistribution extends JavaBase { + constructor(installerOptions: JavaInstallerOptions) { + super('Oracle', installerOptions); + } + + protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { + core.info( + `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` + ); + const javaArchivePath = await tc.downloadTool(javaRelease.url); + + core.info(`Extracting Java archive...`); + let extension = getDownloadArchiveExtension(); + + let extractedJavaPath = await extractJdkFile(javaArchivePath, extension); + + const archiveName = fs.readdirSync(extractedJavaPath)[0]; + const archivePath = path.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + + let javaPath = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); + + return { version: javaRelease.version, path: javaPath }; + } + + protected async findPackageForDownload(range: string): Promise { + const arch = this.distributionArchitecture(); + if (arch !== 'x64' && arch !== 'aarch64') { + throw new Error(`Unsupported architecture: ${this.architecture}`); + } + + if (!this.stable) { + throw new Error('Early access versions are not supported'); + } + + if (this.packageType !== 'jdk') { + throw new Error('Oracle JDK provides only the `jdk` package type'); + } + + const platform = this.getPlatform(); + const extension = getDownloadArchiveExtension(); + let major; + let fileUrl; + if (range.includes('.')) { + major = range.split('.')[0]; + fileUrl = `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } else { + major = range; + fileUrl = `${ORACLE_DL_BASE}/${range}/latest/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + + if (parseInt(major) < 17) { + throw new Error('Oracle JDK is only supported for JDK 17 and later'); + } + + const response = await this.http.head(fileUrl); + + if (response.message.statusCode === HttpCodes.NotFound) { + throw new Error(`Could not find Oracle JDK for SemVer ${range}`); + } + + if (response.message.statusCode !== HttpCodes.OK) { + throw new Error( + `Http request for Oracle JDK failed with status code: ${response.message.statusCode}` + ); + } + + return { url: fileUrl, version: range }; + } + + public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions { + switch (platform) { + case 'darwin': + return 'macos'; + case 'win32': + return 'windows'; + case 'linux': + return 'linux'; + default: + throw new Error( + `Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'` + ); + } + } +} diff --git a/src/distributions/oracle/models.ts b/src/distributions/oracle/models.ts new file mode 100644 index 00000000..2838ead4 --- /dev/null +++ b/src/distributions/oracle/models.ts @@ -0,0 +1 @@ +export type OsVersions = 'linux' | 'macos' | 'windows'; From bd7e5d28eb9da6196a6d6e22a67e72e775996d9d Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 23 Nov 2022 15:24:31 +0100 Subject: [PATCH 4/5] Update minimatch to 3.1.2 (#413) --- .licenses/npm/minimatch.dep.yml | 2 +- dist/cleanup/index.js | 162 ++++++++++++++++++-------------- dist/setup/index.js | 162 ++++++++++++++++++-------------- package-lock.json | 12 +-- 4 files changed, 193 insertions(+), 145 deletions(-) diff --git a/.licenses/npm/minimatch.dep.yml b/.licenses/npm/minimatch.dep.yml index 317e4bc8..869816f5 100644 --- a/.licenses/npm/minimatch.dep.yml +++ b/.licenses/npm/minimatch.dep.yml @@ -1,6 +1,6 @@ --- name: minimatch -version: 3.0.4 +version: 3.1.2 type: npm summary: a glob matcher in javascript homepage: https://github.com/isaacs/minimatch#readme diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 82e68651..169ba9f3 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -53331,10 +53331,10 @@ function populateMaps (extensions, types) { module.exports = minimatch minimatch.Minimatch = Minimatch -var path = { sep: '/' } -try { - path = __nccwpck_require__(1017) -} catch (er) {} +var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = __nccwpck_require__(3717) @@ -53386,43 +53386,64 @@ function filter (pattern, options) { } function ext (a, b) { - a = a || {} b = b || {} var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) return t } minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } var orig = minimatch var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } return m } Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} @@ -53431,9 +53452,6 @@ function minimatch (p, pattern, options) { return false } - // "" only matches "" - if (pattern.trim() === '') return p === '' - return new Minimatch(pattern, options).match(p) } @@ -53442,15 +53460,14 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} + pattern = pattern.trim() // windows support: need to use /, not \ - if (path.sep !== '/') { + if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } @@ -53461,6 +53478,7 @@ function Minimatch (pattern, options) { this.negate = false this.comment = false this.empty = false + this.partial = !!options.partial // make the set of regexps etc. this.make() @@ -53470,9 +53488,6 @@ Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { - // don't do it more than once. - if (this._made) return - var pattern = this.pattern var options = this.options @@ -53492,7 +53507,7 @@ function make () { // step 2: expand braces var set = this.globSet = this.braceExpand() - if (options.debug) this.debug = console.error + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) @@ -53572,12 +53587,11 @@ function braceExpand (pattern, options) { pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } + assertValidPattern(pattern) - if (options.nobrace || - !pattern.match(/\{.*\}/)) { + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } @@ -53585,6 +53599,17 @@ function braceExpand (pattern, options) { return expand(pattern) } +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -53599,14 +53624,17 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } + assertValidPattern(pattern) var options = this.options // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } if (pattern === '') return '' var re = '' @@ -53662,10 +53690,12 @@ function parse (pattern, isSub) { } switch (c) { - case '/': + /* istanbul ignore next */ + case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false + } case '\\': clearStateChar() @@ -53784,25 +53814,23 @@ function parse (pattern, isSub) { // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } // finish up the class. @@ -53886,9 +53914,7 @@ function parse (pattern, isSub) { // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true + case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS @@ -53950,7 +53976,7 @@ function parse (pattern, isSub) { var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { + } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line @@ -54008,7 +54034,7 @@ function makeRe () { try { this.regexp = new RegExp(re, flags) - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp @@ -54026,8 +54052,8 @@ minimatch.match = function (list, pattern, options) { return list } -Minimatch.prototype.match = match -function match (f, partial) { +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. @@ -54109,6 +54135,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // should be impossible. // some invalid regexp stuff in the set. + /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { @@ -54182,6 +54209,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then + /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) @@ -54195,11 +54223,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } + hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) @@ -54230,16 +54254,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is ok if we're doing the match as part of // a glob fs traversal. return partial - } else if (pi === pl) { + } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd + return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. + /* istanbul ignore next */ throw new Error('wtf?') } diff --git a/dist/setup/index.js b/dist/setup/index.js index e0f5a9bf..fd9a0107 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -82352,10 +82352,10 @@ function populateMaps (extensions, types) { module.exports = minimatch minimatch.Minimatch = Minimatch -var path = { sep: '/' } -try { - path = __nccwpck_require__(1017) -} catch (er) {} +var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = __nccwpck_require__(9850) @@ -82407,43 +82407,64 @@ function filter (pattern, options) { } function ext (a, b) { - a = a || {} b = b || {} var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) return t } minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } var orig = minimatch var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } return m } Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} @@ -82452,9 +82473,6 @@ function minimatch (p, pattern, options) { return false } - // "" only matches "" - if (pattern.trim() === '') return p === '' - return new Minimatch(pattern, options).match(p) } @@ -82463,15 +82481,14 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} + pattern = pattern.trim() // windows support: need to use /, not \ - if (path.sep !== '/') { + if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } @@ -82482,6 +82499,7 @@ function Minimatch (pattern, options) { this.negate = false this.comment = false this.empty = false + this.partial = !!options.partial // make the set of regexps etc. this.make() @@ -82491,9 +82509,6 @@ Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { - // don't do it more than once. - if (this._made) return - var pattern = this.pattern var options = this.options @@ -82513,7 +82528,7 @@ function make () { // step 2: expand braces var set = this.globSet = this.braceExpand() - if (options.debug) this.debug = console.error + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) @@ -82593,12 +82608,11 @@ function braceExpand (pattern, options) { pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } + assertValidPattern(pattern) - if (options.nobrace || - !pattern.match(/\{.*\}/)) { + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } @@ -82606,6 +82620,17 @@ function braceExpand (pattern, options) { return expand(pattern) } +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -82620,14 +82645,17 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } + assertValidPattern(pattern) var options = this.options // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } if (pattern === '') return '' var re = '' @@ -82683,10 +82711,12 @@ function parse (pattern, isSub) { } switch (c) { - case '/': + /* istanbul ignore next */ + case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false + } case '\\': clearStateChar() @@ -82805,25 +82835,23 @@ function parse (pattern, isSub) { // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } // finish up the class. @@ -82907,9 +82935,7 @@ function parse (pattern, isSub) { // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true + case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS @@ -82971,7 +82997,7 @@ function parse (pattern, isSub) { var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { + } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line @@ -83029,7 +83055,7 @@ function makeRe () { try { this.regexp = new RegExp(re, flags) - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp @@ -83047,8 +83073,8 @@ minimatch.match = function (list, pattern, options) { return list } -Minimatch.prototype.match = match -function match (f, partial) { +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. @@ -83130,6 +83156,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // should be impossible. // some invalid regexp stuff in the set. + /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { @@ -83203,6 +83230,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then + /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) @@ -83216,11 +83244,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } + hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) @@ -83251,16 +83275,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is ok if we're doing the match as part of // a glob fs traversal. return partial - } else if (pi === pl) { + } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd + return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. + /* istanbul ignore next */ throw new Error('wtf?') } diff --git a/package-lock.json b/package-lock.json index 351da997..1cc39958 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3674,9 +3674,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7657,9 +7657,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } From 19eeec562b37d29a1ad055b7de9c280bd0906d8d Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Wed, 23 Nov 2022 10:28:23 -0600 Subject: [PATCH 5/5] Update to latest `actions/publish-action` (#411) --- .github/workflows/release-new-action-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index b14c183b..1d0fb7f9 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Update the ${{ env.TAG_NAME }} tag id: update-major-tag - uses: actions/publish-action@v0.1.0 + uses: actions/publish-action@v0.2.1 with: source-tag: ${{ env.TAG_NAME }} - slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + slack-webhook: ${{ secrets.SLACK_WEBHOOK }}