Compare commits

..

1 Commits

Author SHA1 Message Date
Crystal Tenn 484b6eb423 add insecure_ssl set to 1 to reduce security checks for certificates 2023-04-19 16:36:59 -04:00
12 changed files with 40 additions and 186 deletions
+9 -18
View File
@@ -1,18 +1,13 @@
name: Create release PR
run-name: Create release PR for new ${{ github.event.inputs.version }} version
run-name: Create release PR for v${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
required: true
type: choice
description: "What type of release is this"
options:
- "major"
- "minor"
- "patch"
description: "Version to bump `package.json` to (format: x.y.z)"
jobs:
create-release-pr:
@@ -36,25 +31,21 @@ jobs:
git config --global user.email "github-actions@github.com"
git config --global user.name "GitHub Actions"
NEW_VERSION=$(./script/workflows/increment-version.sh ${{ inputs.version }})
git checkout -b release/${{ inputs.version }}
git checkout -b release/$NEW_VERSION
npx lerna version $NEW_VERSION --yes --no-push --no-git-tag-version --force-publish
npx lerna version ${{ inputs.version }} --yes --no-push --no-git-tag-version --force-publish
git add **/package.json package-lock.json lerna.json
git commit -m "Release extension version $NEW_VERSION"
git commit -m "Release extension version ${{ inputs.version }}"
git push --set-upstream origin release/$NEW_VERSION
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
git push --set-upstream origin release/${{ inputs.version }}
- name: Create PR
run: |
gh pr create \
--title "Release version ${{ env.new_version }}" \
--body "Release version ${{ env.new_version }}" \
--title "Release version ${{ inputs.version }}" \
--body "Release version ${{ inputs.version }}" \
--base main \
--head release/${{ env.new_version }}
--head release/${{ inputs.version }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/expressions",
"version": "0.3.4",
"version": "0.3.3",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
+3 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/languageserver",
"version": "0.3.4",
"version": "0.3.3",
"description": "Language server for GitHub Actions",
"license": "MIT",
"type": "module",
@@ -43,15 +43,12 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@actions/languageservice": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"@actions/languageservice": "^0.3.3",
"@actions/workflow-parser": "^0.3.3",
"@octokit/rest": "^19.0.7",
"@octokit/types": "^9.0.0",
"@roamhq/mac-ca": "^1.0.7",
"node-forge": "^1.3.1",
"vscode-languageserver": "^8.0.2",
"vscode-languageserver-textdocument": "^1.0.7",
"win-ca": "^3.5.0",
"yaml": "^2.1.3"
},
"engines": {
-35
View File
@@ -1,35 +0,0 @@
export class CertificateReader {
getAllRootCAs(): string[] {
switch (process.platform) {
case "darwin":
return this.getMacOSCerts();
case "win32":
return this.getWindowsCerts();
default:
// We only support self-signed certs from Windows anc MacOS
return [];
}
}
private getMacOSCerts(): string[] {
// loading modules here prevents unnecessary module loading
// see: https://stackoverflow.com/questions/9132772/lazy-loading-in-node-js
const macCa = require("@roamhq/mac-ca");
const forge = require("node-forge");
return macCa.all().map((cert: any) => forge.pki.certificateToPem(cert));
}
private getWindowsCerts(): string[] {
const ca = require("win-ca");
let rootCAs: string[] = [];
ca({
format: ca.der2.pem,
ondata: (crt: string) => rootCAs.push(crt)
});
return rootCAs;
}
}
+7 -23
View File
@@ -1,27 +1,11 @@
import {Octokit} from "@octokit/rest";
import {Agent} from "node:https";
import {CertificateReader} from "./certificate-reader";
export function getClient(token: string, userAgent?: string): Octokit {
const certReader = new CertificateReader();
const selfSignedCerts = certReader.getAllRootCAs();
if (selfSignedCerts.length > 0) {
const httpsAgent = new Agent({
ca: selfSignedCerts
});
return new Octokit({
auth: token,
userAgent: userAgent || `GitHub Actions Language Server`,
request: {
agent: httpsAgent
}
});
} else {
return new Octokit({
auth: token,
userAgent: userAgent || `GitHub Actions Language Server`
});
}
return new Octokit({
auth: token,
userAgent: userAgent || `GitHub Actions Language Server`,
request: {
insecure_ssl: 1
}
});
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/languageservice",
"version": "0.3.4",
"version": "0.3.3",
"description": "Language service for GitHub Actions",
"license": "MIT",
"type": "module",
@@ -44,8 +44,8 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@actions/expressions": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"@actions/expressions": "^0.3.3",
"@actions/workflow-parser": "^0.3.3",
"vscode-languageserver-textdocument": "^1.0.7",
"vscode-languageserver-types": "^3.17.2",
"vscode-uri": "^3.0.7",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.3.4"
"version": "0.3.3"
}
+11 -64
View File
@@ -135,7 +135,7 @@
},
"expressions": {
"name": "@actions/expressions",
"version": "0.3.4",
"version": "0.3.3",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.0.3",
@@ -395,18 +395,15 @@
},
"languageserver": {
"name": "@actions/languageserver",
"version": "0.3.4",
"version": "0.3.3",
"license": "MIT",
"dependencies": {
"@actions/languageservice": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"@actions/languageservice": "^0.3.3",
"@actions/workflow-parser": "^0.3.3",
"@octokit/rest": "^19.0.7",
"@octokit/types": "^9.0.0",
"@roamhq/mac-ca": "^1.0.7",
"node-forge": "^1.3.1",
"vscode-languageserver": "^8.0.2",
"vscode-languageserver-textdocument": "^1.0.7",
"win-ca": "^3.5.0",
"yaml": "^2.1.3"
},
"devDependencies": {
@@ -681,11 +678,11 @@
},
"languageservice": {
"name": "@actions/languageservice",
"version": "0.3.4",
"version": "0.3.3",
"license": "MIT",
"dependencies": {
"@actions/expressions": "^0.3.4",
"@actions/workflow-parser": "^0.3.4",
"@actions/expressions": "^0.3.3",
"@actions/workflow-parser": "^0.3.3",
"vscode-languageserver-textdocument": "^1.0.7",
"vscode-languageserver-types": "^3.17.2",
"vscode-uri": "^3.0.7",
@@ -3698,14 +3695,6 @@
"typescript": "^3 || ^4"
}
},
"node_modules/@roamhq/mac-ca": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@roamhq/mac-ca/-/mac-ca-1.0.7.tgz",
"integrity": "sha512-AOHGY1R0pH+dWJueA5i1gx2V19CLfDa8ojanhyd5ZSI/YDZ3szDr0NSDntFgWGKsvT4TtvNZfDWmXuwbSY9fTg==",
"dependencies": {
"node-forge": "^1.3.1"
}
},
"node_modules/@sinclair/typebox": {
"version": "0.24.51",
"dev": true,
@@ -7009,11 +6998,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-electron": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",
"integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg=="
},
"node_modules/is-extglob": {
"version": "2.1.1",
"dev": true,
@@ -8726,14 +8710,6 @@
}
}
},
"node_modules/node-forge": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
"integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
"engines": {
"node": ">= 6.13.0"
}
},
"node_modules/node-gyp": {
"version": "9.3.0",
"dev": true,
@@ -10712,6 +10688,7 @@
},
"node_modules/split": {
"version": "1.0.1",
"dev": true,
"license": "MIT",
"dependencies": {
"through": "2"
@@ -10977,6 +10954,7 @@
},
"node_modules/through": {
"version": "2.3.8",
"dev": true,
"license": "MIT"
},
"node_modules/through2": {
@@ -11491,37 +11469,6 @@
"string-width": "^1.0.2 || 2 || 3 || 4"
}
},
"node_modules/win-ca": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/win-ca/-/win-ca-3.5.0.tgz",
"integrity": "sha512-0TgO/+2iz2pS3OxBy2ikovPHOYyZRdLRxRTT9ze7DpZwEpaahLFOBuac93GM3lYEVzDyf8fXskJjIX/EILvkhQ==",
"hasInstallScript": true,
"dependencies": {
"is-electron": "^2.2.0",
"make-dir": "^1.3.0",
"node-forge": "^1.2.1",
"split": "^1.0.1"
}
},
"node_modules/win-ca/node_modules/make-dir": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
"integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
"dependencies": {
"pify": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/win-ca/node_modules/pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",
"engines": {
"node": ">=4"
}
},
"node_modules/word-wrap": {
"version": "1.2.3",
"dev": true,
@@ -11773,10 +11720,10 @@
},
"workflow-parser": {
"name": "@actions/workflow-parser",
"version": "0.3.4",
"version": "0.3.3",
"license": "MIT",
"dependencies": {
"@actions/expressions": "^0.3.4",
"@actions/expressions": "^0.3.3",
"cronstrue": "^2.21.0",
"yaml": "^2.0.0-8"
},
-24
View File
@@ -1,24 +0,0 @@
#!/bin/bash
VERSION=$(cat lerna.json | jq -r '.version')
MAJOR=$(echo $VERSION | cut -d. -f1)
MINOR=$(echo $VERSION | cut -d. -f2)
PATCH=$(echo $VERSION | cut -d. -f3)
if [ "$1" == "major" ]; then
MAJOR=$((MAJOR+1))
MINOR=0
PATCH=0
elif [ "$1" == "minor" ]; then
MINOR=$((MINOR+1))
PATCH=0
elif [ "$1" == "patch" ]; then
PATCH=$((PATCH+1))
else
echo "Invalid version type. Use 'major', 'minor' or 'patch'"
exit 1
fi
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
echo $NEW_VERSION
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/workflow-parser",
"version": "0.3.4",
"version": "0.3.3",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
@@ -43,7 +43,7 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@actions/expressions": "^0.3.4",
"@actions/expressions": "^0.3.3",
"cronstrue": "^2.21.0",
"yaml": "^2.0.0-8"
},
+1 -2
View File
@@ -577,8 +577,7 @@
"mapping": {
"properties": {
"types": "merge-group-activity",
"branches": "event-branches",
"branches-ignore": "event-branches-ignore"
"branches": "event-branches"
}
}
},
+2 -7
View File
@@ -73,10 +73,8 @@ on:
- deleted
merge_group:
branches:
- master
- main
branches-ignore:
- develop
- master
- main
types:
- checks_requested
milestone:
@@ -323,9 +321,6 @@ jobs:
"master",
"main"
],
"branches-ignore": [
"develop"
],
"types": [
"checks_requested"
]