Compare commits

..

1 Commits

Author SHA1 Message Date
Jonathan Tamsut 337576fbb9 small README update 2023-04-27 09:00:21 -07:00
4 changed files with 13 additions and 50 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 }}
+3 -1
View File
@@ -1,5 +1,7 @@
# actions/expressions
blah
`@actions/expressions` is a library to parse and evaluate GitHub Actions [expressions](https://docs.github.com/actions/learn-github-actions/expressions).
## Installation
@@ -92,4 +94,4 @@ npm run format-check
## License
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](../LICENSE) for the full terms.
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](../LICENSE) for the full terms.
+1 -7
View File
@@ -179,7 +179,6 @@ export class Lexer {
break;
case "'":
case '"':
this.consumeString();
break;
@@ -300,13 +299,8 @@ export class Lexer {
}
private consumeString() {
// TODO: Should I make these consume double quotes as well?
const isSingleQuote = this.peek() !== "'" || this.peekNext() === "'";
const isDoubleQuote = this.peek() !== '"' || this.peekNext() === '"';
while ((isSingleQuote || isDoubleQuote) && !this.atEnd()) {
while ((this.peek() !== "'" || this.peekNext() === "'") && !this.atEnd()) {
if (this.peek() === "\n") this.line++;
// TODO: Should I also add this for double quotes?
if (this.peek() === "'" && this.peekNext() === "'") {
// Escaped "'", consume
this.next();
-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