Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/cleanup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 28 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "setup-graalvm",
"author": "GraalVM Community",
"description": "GitHub Action for GraalVM",
"version": "1.4.2",
"version": "1.4.3",
"type": "module",
"private": true,
"repository": {
Expand Down Expand Up @@ -70,7 +70,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.5.4",
"jest": "^30.2.0",
"js-yaml": "^4.1.0",
"js-yaml": "^4.1.1",
"prettier": "^3.6.2",
"prettier-eslint": "^16.4.2",
"rollup": "^4.52.5",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as otypes from '@octokit/types'

export const ACTION_VERSION = '1.4.2'
export const ACTION_VERSION = '1.4.3'

export const INPUT_VERSION = 'version'
export const INPUT_GDS_TOKEN = 'gds-token'
Expand Down
3 changes: 2 additions & 1 deletion src/features/musl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as c from '../constants.js'
import * as core from '@actions/core'
import * as tc from '@actions/tool-cache'
import { join } from 'path'
import { downloadFile } from '../utils.js'

const MUSL_NAME = 'musl-toolchain'
const MUSL_VERSION = '1.2.5-oracle-00001'
Expand All @@ -16,7 +17,7 @@ export async function setUpNativeImageMusl(): Promise<void> {
core.info(`Found ${MUSL_NAME} ${MUSL_VERSION} in tool-cache @ ${toolPath}`)
} else {
core.startGroup(`Setting up musl for GraalVM Native Image...`)
const muslDownloadPath = await tc.downloadTool(
const muslDownloadPath = await downloadFile(
`https://gds.oracle.com/download/bfs/archive/musl-toolchain-${MUSL_VERSION}-linux-amd64.tar.gz`
)
const muslExtractPath = await tc.extractTar(muslDownloadPath)
Expand Down
6 changes: 3 additions & 3 deletions src/graalvm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as c from './constants.js'
import * as core from '@actions/core'
import * as semver from 'semver'
import {
downloadFile,
downloadAndExtractJDK,
downloadExtractAndCacheJDK,
getContents,
Expand All @@ -10,7 +11,6 @@ import {
getTaggedRelease
} from './utils.js'
import { downloadGraalVM, downloadGraalVMEELegacy } from './gds.js'
import { downloadTool } from '@actions/tool-cache'
import { basename } from 'path'

const GRAALVM_DL_BASE = 'https://download.oracle.com/graalvm'
Expand Down Expand Up @@ -153,7 +153,7 @@ function determineToolName(javaVersion: string, isCommunity: boolean) {

async function downloadGraalVMJDK(downloadUrl: string, javaVersion: string): Promise<string> {
try {
return await downloadTool(downloadUrl)
return await downloadFile(downloadUrl)
} catch (error) {
if (error instanceof Error && error.message.includes('404')) {
// Not Found
Expand Down Expand Up @@ -265,7 +265,7 @@ async function downloadGraalVMCELegacy(version: string, javaVersion: string): Pr
const graalVMIdentifier = determineGraalVMLegacyIdentifier(false, version, javaVersion)
const downloadUrl = `${GRAALVM_CE_DL_BASE}/${GRAALVM_TAG_PREFIX}${version}/${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`
try {
return await downloadTool(downloadUrl)
return await downloadFile(downloadUrl)
} catch (error) {
if (error instanceof Error && error.message.includes('404')) {
// Not Found
Expand Down
5 changes: 2 additions & 3 deletions src/liberica.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as c from './constants.js'
import * as semver from 'semver'
import { downloadExtractAndCacheJDK, getTaggedRelease, getMatchingTags } from './utils.js'
import { downloadTool } from '@actions/tool-cache'
import { downloadFile, downloadExtractAndCacheJDK, getTaggedRelease, getMatchingTags } from './utils.js'
import { spawnSync } from 'child_process'

const LIBERICA_GH_USER = 'bell-sw'
Expand All @@ -13,7 +12,7 @@ export async function setUpLiberica(javaVersion: string, javaPackage: string): P
const resolvedJavaVersion = await findLatestLibericaJavaVersion(javaVersion)
const downloadUrl = await findLibericaURL(resolvedJavaVersion, javaPackage)
const toolName = determineToolName(javaVersion, javaPackage)
return downloadExtractAndCacheJDK(async () => downloadTool(downloadUrl), toolName, javaVersion)
return downloadExtractAndCacheJDK(async () => downloadFile(downloadUrl), toolName, javaVersion)
}

export async function findLatestLibericaJavaVersion(javaVersion: string): Promise<string> {
Expand Down
Loading
Loading