-
Notifications
You must be signed in to change notification settings - Fork 3
add release workflow. #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new release workflow to the CI pipeline, allowing manual triggering via workflow_dispatch.
- Enables manual release triggering
- Introduces a new release job with steps for checking out the repository, setting up Node.js, installing dependencies, compiling and packaging the extension, and creating/uploading a GitHub release
- name: Install dependencies | ||
run: npm install && cd src/vue && npm install && cd ../.. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider splitting dependency installations into separate steps or using explicit working directory settings to improve clarity and error handling in the workflow.
- name: Install dependencies | |
run: npm install && cd src/vue && npm install && cd ../.. | |
- name: Install root dependencies | |
run: npm install | |
- name: Install Vue dependencies | |
run: npm install | |
working-directory: src/vue |
Copilot uses AI. Check for mistakes.
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: v${{ github.run_number }} | ||
release_name: "Release v${{ github.run_number }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using github.run_number for generating release tags might lead to non-semantic versioning; consider adopting a versioning scheme that better conveys release meaning.
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: v${{ github.run_number }} | |
release_name: "Release v${{ github.run_number }}" | |
- name: Update version | |
id: update_version | |
run: | | |
VERSION=$(cat VERSION) | |
echo "Current version: $VERSION" | |
IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION" | |
if [ "${{ github.event.inputs.release_type }}" == "major" ]; then | |
MAJOR=$((MAJOR + 1)) | |
MINOR=0 | |
PATCH=0 | |
elif [ "${{ github.event.inputs.release_type }}" == "minor" ]; then | |
MINOR=$((MINOR + 1)) | |
PATCH=0 | |
else | |
PATCH=$((PATCH + 1)) | |
fi | |
NEW_VERSION="$MAJOR.$MINOR.$PATCH" | |
echo "New version: $NEW_VERSION" | |
echo "$NEW_VERSION" > VERSION | |
echo "::set-output name=new_version::$NEW_VERSION" | |
git config user.name "github-actions" | |
git config user.email "github-actions@github.com" | |
git add VERSION | |
git commit -m "Bump version to $NEW_VERSION" | |
git push | |
uses: actions/create-release@v1 | |
with: | |
tag_name: v${{ steps.update_version.outputs.new_version }} | |
release_name: "Release v${{ steps.update_version.outputs.new_version }}" |
Copilot uses AI. Check for mistakes.
No description provided.