-
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.
Merge pull request #13 from syaiful-aa/ci/up
title up
- Loading branch information
Showing
1 changed file
with
10 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 |
---|---|---|
|
@@ -23,13 +23,13 @@ jobs: | |
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
ref: ${{ github.event.pull_request.merge_commit_sha }} | ||
|
||
- name: Get version | ||
id: get-version | ||
run: | | ||
git fetch origin main | ||
prev_version=$(git show main:pubspec.yaml | grep 'version:' | cut -d ':' -f2 | sed 's/ //' | cut -d'+' -f1) | ||
prev_version=$(git show origin/main:pubspec.yaml | grep 'version:' | cut -d ':' -f2 | sed 's/ //' | cut -d'+' -f1) | ||
echo "prev_version=$prev_version" >> $GITHUB_OUTPUT | ||
full_version=$(cat pubspec.yaml | grep 'version' | cut -d ':' -f2 | sed 's/ //' | cut -d'+' -f1) | ||
|
@@ -45,12 +45,17 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
ref: ${{ github.event.pull_request.merge_commit_sha }} | ||
|
||
- name: Tag new target | ||
run: | | ||
git tag -f v${{ needs.validate_version.outputs.full_version }} ${{ github.event.pull_request.head.sha }} | ||
git tag -f v${{ needs.validate_version.outputs.major_version }} ${{ github.event.pull_request.head.sha }} | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Action" | ||
message="${{ github.event.pull_request.title }}" | ||
git tag -f v${{ needs.validate_version.outputs.full_version }} -m $message | ||
git tag -f v${{ needs.validate_version.outputs.major_version }} -m $message | ||
- name: Push new tag | ||
run: | | ||
|