-
Notifications
You must be signed in to change notification settings - Fork 0
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
xiaoweii
committed
Aug 22, 2023
1 parent
6b3b527
commit 6762a45
Showing
3 changed files
with
37 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Release Next Version | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: 'Release Tag' | ||
required: true | ||
type: string | ||
env: | ||
NEW_VERSION: ${{ github.event.inputs.release_tag }} | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
token : ${{ secrets.PROJECT_TOKEN }} | ||
- name: Modify for next release | ||
run: | | ||
chmod +x release.sh | ||
./release.sh ${{ env.NEW_VERSION }} | ||
git diff | ||
git config user.name '${{ vars.USER_NAME }}' | ||
git config user.email '${{ vars.USER_EMAIL }}' | ||
git add . | ||
git commit -m 'release: clickstream Web ${{ env.NEW_VERSION }}' | ||
git push |
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,7 @@ | ||
#!/bin/bash | ||
|
||
version="$1" | ||
echo ${version} | ||
regex="[0-9]\+\.[0-9]\+\.[0-9]\+" | ||
|
||
sed -i "s/\"version\": \"${regex}\"/\"version\": \"${version}\"/g" package.json |
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