Compare commits
1 Commits
releases/v
...
addSupport
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
238f7b14d4 |
20
.github/workflows/release-pr.yml
vendored
20
.github/workflows/release-pr.yml
vendored
@@ -1,18 +1,14 @@
|
|||||||
name: Release Project
|
name: Create release PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- CHANGELOG.md
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release:
|
||||||
|
description: 'Define release version (ex: v1, v2, v3)'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release-pr:
|
||||||
permissions:
|
uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main
|
||||||
actions: read
|
|
||||||
contents: write
|
|
||||||
uses: Azure/action-release-workflows/.github/workflows/release_js_project.yaml@a705b2ab6a3ee889f2b0d925ad0bd2f9eb733ce6
|
|
||||||
with:
|
with:
|
||||||
changelogPath: ./CHANGELOG.md
|
release: ${{ github.event.inputs.release }}
|
||||||
|
|||||||
10
.github/workflows/tag-and-draft.yml
vendored
Normal file
10
.github/workflows/tag-and-draft.yml
vendored
Normal 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
1
.gitignore
vendored
@@ -330,3 +330,4 @@ ASALocalRun/
|
|||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
# Transpiled JS
|
# Transpiled JS
|
||||||
|
lib/
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## [v4.0.0] - 2024-01-30
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- #90 Migrate to node 20 as node 16 is deprecated
|
|
||||||
@@ -11,5 +11,5 @@ outputs:
|
|||||||
branding:
|
branding:
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node16'
|
||||||
main: 'lib/index.js'
|
main: 'lib/index.js'
|
||||||
|
|||||||
7489
lib/index.js
7489
lib/index.js
File diff suppressed because it is too large
Load Diff
844
package-lock.json
generated
844
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm i ncc && npx ncc build src/run.ts -o lib",
|
"build": "ncc build src/run.ts -o lib",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test-coverage": "jest --coverage",
|
"test-coverage": "jest --coverage",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
@@ -18,10 +18,9 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.9.1",
|
||||||
"@actions/exec": "^1.0.0",
|
"@actions/exec": "^1.0.0",
|
||||||
"@actions/tool-cache": "^1.0.0",
|
"@actions/tool-cache": "^1.0.0"
|
||||||
"ncc": "^0.3.6"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.0",
|
"@types/jest": "^26.0.0",
|
||||||
|
|||||||
@@ -12,14 +12,26 @@ export function getKubectlArch(): string {
|
|||||||
export function getkubectlDownloadURL(version: string, arch: string): string {
|
export function getkubectlDownloadURL(version: string, arch: string): string {
|
||||||
switch (os.type()) {
|
switch (os.type()) {
|
||||||
case 'Linux':
|
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':
|
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':
|
case 'Windows_NT':
|
||||||
default:
|
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
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ describe('Testing all functions in run file.', () => {
|
|||||||
(arch) => {
|
(arch) => {
|
||||||
jest.spyOn(os, 'type').mockReturnValue('Linux')
|
jest.spyOn(os, 'type').mockReturnValue('Linux')
|
||||||
const kubectlLinuxUrl = util.format(
|
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
|
arch
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ describe('Testing all functions in run file.', () => {
|
|||||||
(arch) => {
|
(arch) => {
|
||||||
jest.spyOn(os, 'type').mockReturnValue('Darwin')
|
jest.spyOn(os, 'type').mockReturnValue('Darwin')
|
||||||
const kubectlDarwinUrl = util.format(
|
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
|
arch
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ describe('Testing all functions in run file.', () => {
|
|||||||
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
|
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
|
||||||
|
|
||||||
const kubectlWindowsUrl = util.format(
|
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
|
arch
|
||||||
)
|
)
|
||||||
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)
|
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)
|
||||||
|
|||||||
Reference in New Issue
Block a user