1 Commits

Author SHA1 Message Date
asgayle
238f7b14d4 added support message 2022-10-17 11:17:40 -04:00
10 changed files with 284 additions and 8120 deletions

View File

@@ -1,18 +1,14 @@
name: Release Project
name: Create release PR
on:
push:
branches:
- main
paths:
- CHANGELOG.md
workflow_dispatch:
inputs:
release:
description: 'Define release version (ex: v1, v2, v3)'
required: true
jobs:
release:
permissions:
actions: read
contents: write
uses: Azure/action-release-workflows/.github/workflows/release_js_project.yaml@a705b2ab6a3ee889f2b0d925ad0bd2f9eb733ce6
release-pr:
uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main
with:
changelogPath: ./CHANGELOG.md
release: ${{ github.event.inputs.release }}

10
.github/workflows/tag-and-draft.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
name: Tag and create release draft
on:
push:
branches:
- releases/*
jobs:
tag-and-release:
uses: OliverMKing/javascript-release-workflow/.github/workflows/tag-and-release.yml@main

1
.gitignore vendored
View File

@@ -330,3 +330,4 @@ ASALocalRun/
node_modules
# Transpiled JS
lib/

View File

@@ -1,7 +0,0 @@
# Changelog
## [v4.0.0] - 2024-01-30
### Changed
- #90 Migrate to node 20 as node 16 is deprecated

View File

@@ -11,5 +11,5 @@ outputs:
branding:
color: 'blue'
runs:
using: 'node20'
using: 'node16'
main: 'lib/index.js'

File diff suppressed because it is too large Load Diff

844
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
"private": true,
"main": "lib/index.js",
"scripts": {
"build": "npm i ncc && npx ncc build src/run.ts -o lib",
"build": "ncc build src/run.ts -o lib",
"test": "jest",
"test-coverage": "jest --coverage",
"format": "prettier --write .",
@@ -18,10 +18,9 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.9.1",
"@actions/exec": "^1.0.0",
"@actions/tool-cache": "^1.0.0",
"ncc": "^0.3.6"
"@actions/tool-cache": "^1.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.0",

View File

@@ -12,14 +12,26 @@ export function getKubectlArch(): string {
export function getkubectlDownloadURL(version: string, arch: string): string {
switch (os.type()) {
case 'Linux':
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl',
version,
arch
)
case 'Darwin':
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl',
version,
arch
)
case 'Windows_NT':
default:
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe',
version,
arch
)
}
}

View File

@@ -45,7 +45,7 @@ describe('Testing all functions in run file.', () => {
(arch) => {
jest.spyOn(os, 'type').mockReturnValue('Linux')
const kubectlLinuxUrl = util.format(
'https://dl.k8s.io/release/v1.15.0/bin/linux/%s/kubectl',
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/%s/kubectl',
arch
)
@@ -59,7 +59,7 @@ describe('Testing all functions in run file.', () => {
(arch) => {
jest.spyOn(os, 'type').mockReturnValue('Darwin')
const kubectlDarwinUrl = util.format(
'https://dl.k8s.io/release/v1.15.0/bin/darwin/%s/kubectl',
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/darwin/%s/kubectl',
arch
)
@@ -74,7 +74,7 @@ describe('Testing all functions in run file.', () => {
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
const kubectlWindowsUrl = util.format(
'https://dl.k8s.io/release/v1.15.0/bin/windows/%s/kubectl.exe',
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/windows/%s/kubectl.exe',
arch
)
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)