Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49b80c3ef0 |
@@ -1,18 +1,13 @@
|
|||||||
name: Create release PR
|
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:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
required: true
|
required: true
|
||||||
type: choice
|
description: "Version to bump `package.json` to (format: x.y.z)"
|
||||||
description: "What type of release is this"
|
|
||||||
options:
|
|
||||||
- "major"
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release-pr:
|
create-release-pr:
|
||||||
@@ -36,25 +31,21 @@ jobs:
|
|||||||
git config --global user.email "[email protected]"
|
git config --global user.email "[email protected]"
|
||||||
git config --global user.name "GitHub Actions"
|
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 ${{ inputs.version }} --yes --no-push --no-git-tag-version --force-publish
|
||||||
|
|
||||||
npx lerna version $NEW_VERSION --yes --no-push --no-git-tag-version --force-publish
|
|
||||||
|
|
||||||
git add **/package.json package-lock.json lerna.json
|
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
|
git push --set-upstream origin release/${{ inputs.version }}
|
||||||
|
|
||||||
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Create PR
|
- name: Create PR
|
||||||
run: |
|
run: |
|
||||||
gh pr create \
|
gh pr create \
|
||||||
--title "Release version ${{ env.new_version }}" \
|
--title "Release version ${{ inputs.version }}" \
|
||||||
--body "Release version ${{ env.new_version }}" \
|
--body "Release version ${{ inputs.version }}" \
|
||||||
--base main \
|
--base main \
|
||||||
--head release/${{ env.new_version }}
|
--head release/${{ inputs.version }}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/expressions",
|
"name": "@actions/expressions",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ export class Lexer {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "'":
|
case "'":
|
||||||
case '"':
|
|
||||||
this.consumeString();
|
this.consumeString();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -300,13 +299,8 @@ export class Lexer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private consumeString() {
|
private consumeString() {
|
||||||
// TODO: Should I make these consume double quotes as well?
|
while ((this.peek() !== "'" || this.peekNext() === "'") && !this.atEnd()) {
|
||||||
const isSingleQuote = this.peek() !== "'" || this.peekNext() === "'";
|
|
||||||
const isDoubleQuote = this.peek() !== '"' || this.peekNext() === '"';
|
|
||||||
|
|
||||||
while ((isSingleQuote || isDoubleQuote) && !this.atEnd()) {
|
|
||||||
if (this.peek() === "\n") this.line++;
|
if (this.peek() === "\n") this.line++;
|
||||||
// TODO: Should I also add this for double quotes?
|
|
||||||
if (this.peek() === "'" && this.peekNext() === "'") {
|
if (this.peek() === "'" && this.peekNext() === "'") {
|
||||||
// Escaped "'", consume
|
// Escaped "'", consume
|
||||||
this.next();
|
this.next();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/languageserver",
|
"name": "@actions/languageserver",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"description": "Language server for GitHub Actions",
|
"description": "Language server for GitHub Actions",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -43,8 +43,8 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/languageservice": "^0.3.4",
|
"@actions/languageservice": "^0.3.3",
|
||||||
"@actions/workflow-parser": "^0.3.4",
|
"@actions/workflow-parser": "^0.3.3",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"@octokit/types": "^9.0.0",
|
"@octokit/types": "^9.0.0",
|
||||||
"vscode-languageserver": "^8.0.2",
|
"vscode-languageserver": "^8.0.2",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import {File} from "@actions/workflow-parser/workflows/file";
|
|||||||
import {FileProvider} from "@actions/workflow-parser/workflows/file-provider";
|
import {FileProvider} from "@actions/workflow-parser/workflows/file-provider";
|
||||||
import {fileIdentifier} from "@actions/workflow-parser/workflows/file-reference";
|
import {fileIdentifier} from "@actions/workflow-parser/workflows/file-reference";
|
||||||
import {Octokit} from "@octokit/rest";
|
import {Octokit} from "@octokit/rest";
|
||||||
|
import path from "path";
|
||||||
import {TTLCache} from "./utils/cache";
|
import {TTLCache} from "./utils/cache";
|
||||||
import vscodeURI from "vscode-uri/lib/umd";
|
|
||||||
|
|
||||||
export function getFileProvider(
|
export function getFileProvider(
|
||||||
client: Octokit | undefined,
|
client: Octokit | undefined,
|
||||||
@@ -31,10 +31,7 @@ export function getFileProvider(
|
|||||||
throw new Error("Local file references are not supported with this configuration");
|
throw new Error("Local file references are not supported with this configuration");
|
||||||
}
|
}
|
||||||
|
|
||||||
const workspaceURI = vscodeURI.URI.parse(workspace);
|
const file = await readFile(path.join(workspace, ref.path));
|
||||||
const refURI = vscodeURI.Utils.joinPath(workspaceURI, ref.path);
|
|
||||||
const file = await readFile(refURI.toString());
|
|
||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
throw new Error(`File not found: ${ref.path}`);
|
throw new Error(`File not found: ${ref.path}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/languageservice",
|
"name": "@actions/languageservice",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"description": "Language service for GitHub Actions",
|
"description": "Language service for GitHub Actions",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -44,8 +44,8 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.4",
|
"@actions/expressions": "^0.3.3",
|
||||||
"@actions/workflow-parser": "^0.3.4",
|
"@actions/workflow-parser": "^0.3.3",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
"vscode-languageserver-types": "^3.17.2",
|
"vscode-languageserver-types": "^3.17.2",
|
||||||
"vscode-uri": "^3.0.7",
|
"vscode-uri": "^3.0.7",
|
||||||
|
|||||||
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
## This script syncs all five repositories to the current state of main.
|
||||||
|
## It will stash changes on the current branch, switch to main, pull and remain on main.
|
||||||
|
|
||||||
|
echo "Syncing all repositories to main"
|
||||||
|
|
||||||
|
# for each folder in the above directory
|
||||||
|
cd ..
|
||||||
|
for d in */ ; do
|
||||||
|
cd $d
|
||||||
|
echo "Syncing $d"
|
||||||
|
echo "current branch: $(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
git stash
|
||||||
|
git checkout main
|
||||||
|
git pull
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"version": "0.3.4"
|
"version": "0.3.3"
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+9
-9
@@ -135,7 +135,7 @@
|
|||||||
},
|
},
|
||||||
"expressions": {
|
"expressions": {
|
||||||
"name": "@actions/expressions",
|
"name": "@actions/expressions",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.0.3",
|
"@types/jest": "^29.0.3",
|
||||||
@@ -395,11 +395,11 @@
|
|||||||
},
|
},
|
||||||
"languageserver": {
|
"languageserver": {
|
||||||
"name": "@actions/languageserver",
|
"name": "@actions/languageserver",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/languageservice": "^0.3.4",
|
"@actions/languageservice": "^0.3.3",
|
||||||
"@actions/workflow-parser": "^0.3.4",
|
"@actions/workflow-parser": "^0.3.3",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"@octokit/types": "^9.0.0",
|
"@octokit/types": "^9.0.0",
|
||||||
"vscode-languageserver": "^8.0.2",
|
"vscode-languageserver": "^8.0.2",
|
||||||
@@ -678,11 +678,11 @@
|
|||||||
},
|
},
|
||||||
"languageservice": {
|
"languageservice": {
|
||||||
"name": "@actions/languageservice",
|
"name": "@actions/languageservice",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.4",
|
"@actions/expressions": "^0.3.3",
|
||||||
"@actions/workflow-parser": "^0.3.4",
|
"@actions/workflow-parser": "^0.3.3",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
"vscode-languageserver-types": "^3.17.2",
|
"vscode-languageserver-types": "^3.17.2",
|
||||||
"vscode-uri": "^3.0.7",
|
"vscode-uri": "^3.0.7",
|
||||||
@@ -11720,10 +11720,10 @@
|
|||||||
},
|
},
|
||||||
"workflow-parser": {
|
"workflow-parser": {
|
||||||
"name": "@actions/workflow-parser",
|
"name": "@actions/workflow-parser",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.4",
|
"@actions/expressions": "^0.3.3",
|
||||||
"cronstrue": "^2.21.0",
|
"cronstrue": "^2.21.0",
|
||||||
"yaml": "^2.0.0-8"
|
"yaml": "^2.0.0-8"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/workflow-parser",
|
"name": "@actions/workflow-parser",
|
||||||
"version": "0.3.4",
|
"version": "0.3.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/expressions": "^0.3.4",
|
"@actions/expressions": "^0.3.3",
|
||||||
"cronstrue": "^2.21.0",
|
"cronstrue": "^2.21.0",
|
||||||
"yaml": "^2.0.0-8"
|
"yaml": "^2.0.0-8"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -577,8 +577,7 @@
|
|||||||
"mapping": {
|
"mapping": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"types": "merge-group-activity",
|
"types": "merge-group-activity",
|
||||||
"branches": "event-branches",
|
"branches": "event-branches"
|
||||||
"branches-ignore": "event-branches-ignore"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-7
@@ -73,10 +73,8 @@ on:
|
|||||||
- deleted
|
- deleted
|
||||||
merge_group:
|
merge_group:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- main
|
- main
|
||||||
branches-ignore:
|
|
||||||
- develop
|
|
||||||
types:
|
types:
|
||||||
- checks_requested
|
- checks_requested
|
||||||
milestone:
|
milestone:
|
||||||
@@ -323,9 +321,6 @@ jobs:
|
|||||||
"master",
|
"master",
|
||||||
"main"
|
"main"
|
||||||
],
|
],
|
||||||
"branches-ignore": [
|
|
||||||
"develop"
|
|
||||||
],
|
|
||||||
"types": [
|
"types": [
|
||||||
"checks_requested"
|
"checks_requested"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user