-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b81a35e
commit 8dd0dfb
Showing
2 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,48 @@ | ||
name: ReleaseTest | ||
name: Update version and create Release's PR Workflow | ||
|
||
on: [push] | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version name' | ||
required: true | ||
default: 'minor' | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Test snow installation | ||
shell: bash | ||
run: | | ||
git branch --show-current | ||
version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.x" | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Set up Git | ||
run: | | ||
git config user.name "Your GitHub User Name" | ||
git config user.email "Your GitHub User Email" | ||
- name: Update the version | ||
id: update_version | ||
run: | | ||
echo "version=$(npm version ${{ github.event.inputs.version }} --no-git- tag-version)" >> $GITHUB_OUTPUT | ||
- name: Update Changelog | ||
id: update_changelog | ||
run: | | ||
sed -i 's/Unreleased/${{ steps.update_version.outputs.version }}/g' CHANGELOG.md | ||
- name: Create pull request | ||
id: create_pr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: release/${{ steps.update_version.outputs.version }} | ||
title: "Release: ${{ steps.update_version.outputs.version }} Pull Request" | ||
body: "This pull request contains the updated package.json with the new release version" | ||
base: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### CHANGELONG | ||
|
||
## [Unreleased] | ||
### Added | ||
- Testing |