Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e0aec4d80 | |||
| 688936d8db | |||
| d1dc92d6ff | |||
| f471212b11 | |||
| 6a79469612 | |||
| 4552b26c1d | |||
| 0a920068d6 | |||
| 340b2c4cf2 | |||
| bc474d7b1f | |||
| 796733b6bf | |||
| dd44a92c26 | |||
| bd5ca45a62 | |||
| ad011b0706 | |||
| 4beba283ef | |||
| 07847ca908 |
@@ -1,14 +1,18 @@
|
||||
name: Create release PR
|
||||
name: Release Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- CHANGELOG.md
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release:
|
||||
description: 'Define release version (ex: v1, v2, v3)'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
release-pr:
|
||||
uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main
|
||||
release:
|
||||
permissions:
|
||||
actions: read
|
||||
contents: write
|
||||
uses: Azure/action-release-workflows/.github/workflows/release_js_project.yaml@a705b2ab6a3ee889f2b0d925ad0bd2f9eb733ce6
|
||||
with:
|
||||
release: ${{ github.event.inputs.release }}
|
||||
changelogPath: ./CHANGELOG.md
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
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
|
||||
@@ -330,4 +330,3 @@ ASALocalRun/
|
||||
node_modules
|
||||
|
||||
# Transpiled JS
|
||||
lib/
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
## [v4.0.0] - 2024-01-30
|
||||
|
||||
### Changed
|
||||
|
||||
- #90 Migrate to node 20 as node 16 is deprecated
|
||||
@@ -26,3 +26,7 @@ provided by the bot. You will only need to do this once across all repos using o
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
## Support
|
||||
|
||||
setup-kubectl is an open source project that is [**not** covered by the Microsoft Azure support policy](https://support.microsoft.com/en-us/help/2941892/support-for-linux-and-open-source-technology-in-azure). [Please search open issues here](https://github.com/Azure/setup-kubectl/issues), and if your issue isn't already represented please [open a new one](https://github.com/Azure/setup-kubectl/issues/new/choose). The project maintainers will respond to the best of their abilities.
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ outputs:
|
||||
branding:
|
||||
color: 'blue'
|
||||
runs:
|
||||
using: 'node16'
|
||||
using: 'node20'
|
||||
main: 'lib/index.js'
|
||||
|
||||
+7489
File diff suppressed because it is too large
Load Diff
Generated
+601
-243
File diff suppressed because it is too large
Load Diff
+4
-3
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"build": "ncc build src/run.ts -o lib",
|
||||
"build": "npm i ncc && npx ncc build src/run.ts -o lib",
|
||||
"test": "jest",
|
||||
"test-coverage": "jest --coverage",
|
||||
"format": "prettier --write .",
|
||||
@@ -18,9 +18,10 @@
|
||||
"author": "GitHub",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.0.0",
|
||||
"@actions/tool-cache": "^1.0.0"
|
||||
"@actions/tool-cache": "^1.0.0",
|
||||
"ncc": "^0.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.0",
|
||||
|
||||
+3
-15
@@ -12,26 +12,14 @@ export function getKubectlArch(): string {
|
||||
export function getkubectlDownloadURL(version: string, arch: string): string {
|
||||
switch (os.type()) {
|
||||
case 'Linux':
|
||||
return util.format(
|
||||
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl',
|
||||
version,
|
||||
arch
|
||||
)
|
||||
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
|
||||
|
||||
case 'Darwin':
|
||||
return util.format(
|
||||
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl',
|
||||
version,
|
||||
arch
|
||||
)
|
||||
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
|
||||
|
||||
case 'Windows_NT':
|
||||
default:
|
||||
return util.format(
|
||||
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe',
|
||||
version,
|
||||
arch
|
||||
)
|
||||
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ describe('Testing all functions in run file.', () => {
|
||||
(arch) => {
|
||||
jest.spyOn(os, 'type').mockReturnValue('Linux')
|
||||
const kubectlLinuxUrl = util.format(
|
||||
'https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/%s/kubectl',
|
||||
'https://dl.k8s.io/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://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/darwin/%s/kubectl',
|
||||
'https://dl.k8s.io/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://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/windows/%s/kubectl.exe',
|
||||
'https://dl.k8s.io/release/v1.15.0/bin/windows/%s/kubectl.exe',
|
||||
arch
|
||||
)
|
||||
expect(getkubectlDownloadURL('v1.15.0', arch)).toBe(kubectlWindowsUrl)
|
||||
|
||||
Reference in New Issue
Block a user