-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Fix issue with github actions (#1185)
- Loading branch information
1 parent
0f510dd
commit ad3bfb7
Showing
1 changed file
with
13 additions
and
11 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 |
---|---|---|
|
@@ -27,7 +27,7 @@ jobs: | |
BASE_VERSION="${{ github.event.inputs.version }}" | ||
BRANCH_NAME="release/v${BASE_VERSION}" | ||
git fetch origin release/${BASE_VERSION} || git fetch --all | ||
git fetch --all | ||
if git rev-parse --verify origin/${BRANCH_NAME} >/dev/null 2>&1; then | ||
echo "Branch ${BRANCH_NAME} exists, checking out..." | ||
|
@@ -37,7 +37,7 @@ jobs: | |
git checkout -b ${BRANCH_NAME} | ||
fi | ||
CURRENT_RC=$(git tag -l "${BASE_VERSION}-rc*" | sort | tail -n 1) | ||
CURRENT_RC=$(git tag -l "v${BASE_VERSION}-rc*" | sort | tail -n 1) | ||
if [[ -z "$CURRENT_RC" ]]; then | ||
RC_SUFFIX="-rc01" | ||
else | ||
|
@@ -69,15 +69,6 @@ jobs: | |
sed -i "s/versionCode = [0-9]\+/versionCode = ${{ env.VERSION_CODE }}/g" app/build.gradle.kts | ||
sed -i "s/versionName = \"[^\"]*\"/versionName = \"${{ env.VERSION_NAME }}\"/g" app/build.gradle.kts | ||
- name: Commit and Push Changes | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -m "Release version ${{ env.VERSION_NAME }}" || echo "No changes to commit" | ||
git config push.autoSetupRemote true | ||
git push --set-upstream origin ${BRANCH_NAME} | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
|
@@ -137,6 +128,15 @@ jobs: | |
mv app/build/outputs/apk/release/app-x86-release.apk app/build/outputs/apk/release/nextplayer-v${{ env.VERSION_NAME }}-x86.apk | ||
mv app/build/outputs/apk/release/app-x86_64-release.apk app/build/outputs/apk/release/nextplayer-v${{ env.VERSION_NAME }}-x86_64.apk | ||
- name: Commit and Push Changes | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -m "Release version ${{ env.VERSION_NAME }}" || echo "No changes to commit" | ||
git config push.autoSetupRemote true | ||
git push --set-upstream origin ${BRANCH_NAME} | ||
- name: Create Draft Release | ||
id: create_draft_release | ||
uses: softprops/action-gh-release@v2 | ||
|
@@ -147,3 +147,5 @@ jobs: | |
draft: true | ||
name: v${{ env.VERSION_NAME }} | ||
generate_release_notes: true | ||
prerelease: ${{ github.event.inputs.release_type == 'preview' }} | ||
tag_name: v${{ env.VERSION_NAME }} |