Compare commits
19 Commits
addSupport
...
add-depend
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99a67fc861 | ||
|
|
b69ae10816 | ||
|
|
8c6b38b357 | ||
|
|
2a0a121944 | ||
|
|
619a3634cc | ||
|
|
688936d8db | ||
|
|
d1dc92d6ff | ||
|
|
f471212b11 | ||
|
|
6a79469612 | ||
|
|
4552b26c1d | ||
|
|
0a920068d6 | ||
|
|
340b2c4cf2 | ||
|
|
bc474d7b1f | ||
|
|
796733b6bf | ||
|
|
dd44a92c26 | ||
|
|
bd5ca45a62 | ||
|
|
ad011b0706 | ||
|
|
4beba283ef | ||
|
|
07847ca908 |
18
.github/dependabot.yml
vendored
Normal file
18
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
groups:
|
||||
actions:
|
||||
patterns:
|
||||
- '*'
|
||||
- package-ecosystem: github-actions
|
||||
directory: .github/workflows
|
||||
schedule:
|
||||
interval: weekly
|
||||
groups:
|
||||
actions:
|
||||
patterns:
|
||||
- '*'
|
||||
20
.github/workflows/release-pr.yml
vendored
20
.github/workflows/release-pr.yml
vendored
@@ -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@v1
|
||||
with:
|
||||
release: ${{ github.event.inputs.release }}
|
||||
changelogPath: ./CHANGELOG.md
|
||||
|
||||
10
.github/workflows/tag-and-draft.yml
vendored
10
.github/workflows/tag-and-draft.yml
vendored
@@ -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
|
||||
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
## [v4.0.0] - 2024-01-30
|
||||
|
||||
### Changed
|
||||
|
||||
- #90 Migrate to node 20 as node 16 is deprecated
|
||||
@@ -5,7 +5,7 @@
|
||||
Acceptable values are latest or any semantic version string like `v1.15.0`. Use this action in workflow to define which version of kubectl will be used.
|
||||
|
||||
```yaml
|
||||
- uses: azure/setup-kubectl@v3
|
||||
- uses: azure/setup-kubectl@v4
|
||||
with:
|
||||
version: '<version>' # default is latest stable
|
||||
id: install
|
||||
|
||||
@@ -11,5 +11,5 @@ outputs:
|
||||
branding:
|
||||
color: 'blue'
|
||||
runs:
|
||||
using: 'node16'
|
||||
using: 'node20'
|
||||
main: 'lib/index.js'
|
||||
|
||||
606
package-lock.json
generated
606
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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,7 +18,7 @@
|
||||
"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"
|
||||
},
|
||||
|
||||
@@ -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`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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