This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
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 #25 from ThePieMonster/ThePieMonster-Workflow
Update Workflow
- Loading branch information
Showing
1 changed file
with
50 additions
and
49 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 |
---|---|---|
|
@@ -52,6 +52,12 @@ jobs: | |
echo "$LATESTRELEASETAG" | ||
echo "LATESTRELEASETAG=$LATESTRELEASETAG" >> $GITHUB_ENV | ||
- name: Create Latest Release TXT File | ||
working-directory : ${{ github.workspace }}/app | ||
run : | | ||
echo "Create Latest Release TXT File" | ||
echo "${{ env.LATESTRELEASETAG }}" > LatestReleaseTag.txt | ||
- name: Get Gradle VersionName | ||
working-directory : ${{ github.workspace }}/app | ||
run : | | ||
|
@@ -66,7 +72,7 @@ jobs: | |
echo "Create Gradle VersionName TXT File" | ||
echo "${{ env.VERSIONNAME }}" > VersionName.txt | ||
- name: Check If Current Tag Equals Latest Release | ||
- name: Check If Gradle Version Equals Latest Release Tag | ||
working-directory : ${{ github.workspace }}/app | ||
run : | | ||
VERSIONNAME=${{ env.VERSIONNAME }} | ||
|
@@ -75,30 +81,30 @@ jobs: | |
echo "Latest Release Tag: $LATESTRELEASETAG" | ||
if [ "$VERSIONNAME" = "$LATESTRELEASETAG" ]; then echo "Current Gradle Version is the same as GitHubs latest Release tag. This is a tagging conflict and can be resolved by updating the build.gradle file."; exit 1; else echo "All clear!"; fi | ||
- name: Check If Current Tag Already Exists | ||
uses: mukunku/[email protected] | ||
id: checkTag | ||
with: | ||
tag: ${{ env.VERSIONNAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Output Tag Check | ||
run: | | ||
echo "Tag Check: ${{ steps.checkTag.outputs.exists }}" | ||
echo "TAGCHECK=${{ steps.checkTag.outputs.exists }}" >> $GITHUB_ENV | ||
- name: Create Tag | ||
if: env.TAGCHECK == format('false') | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: 'refs/tags/${{ env.VERSIONNAME }}', | ||
sha: context.sha | ||
}) | ||
# - name: Check If Current Tag Already Exists | ||
# uses: mukunku/[email protected] | ||
# id: checkTag | ||
# with: | ||
# tag: ${{ env.VERSIONNAME }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# | ||
# - name: Output Tag Check | ||
# run: | | ||
# echo "Tag Check: ${{ steps.checkTag.outputs.exists }}" | ||
# echo "TAGCHECK=${{ steps.checkTag.outputs.exists }}" >> $GITHUB_ENV | ||
# | ||
# - name: Create Tag | ||
# if: env.TAGCHECK == format('false') | ||
# uses: actions/github-script@v5 | ||
# with: | ||
# script: | | ||
# github.rest.git.createRef({ | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# ref: 'refs/tags/${{ env.VERSIONNAME }}', | ||
# sha: context.sha | ||
# }) | ||
|
||
- name: Decode Keystore | ||
id: decode_keystore | ||
|
@@ -153,11 +159,11 @@ jobs: | |
name: VersionName.txt | ||
path: ${{ github.workspace }}/app/VersionName.txt | ||
|
||
- name: Upload Artifact Changelog | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Changelog.txt | ||
path: ${{ github.workspace }}/app/Changelog.txt | ||
# - name: Upload Artifact Changelog | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: Changelog.txt | ||
# path: ${{ github.workspace }}/app/Changelog.txt | ||
|
||
merge_completed: | ||
needs: build | ||
|
@@ -194,27 +200,22 @@ jobs: | |
echo "Read Gradle VersionName" | ||
echo "VERSIONNAME=$(cat VersionName.txt)" >> $GITHUB_ENV | ||
- name: Output Gradle VersionName | ||
run : | | ||
echo "Output Gradle VersionName" | ||
echo "${{ env.VERSIONNAME }}" | ||
- name: Download Artifact Changelog | ||
uses: actions/[email protected] | ||
with: | ||
name: Changelog.txt | ||
path: ${{ github.workspace }}/artifact | ||
# - name: Download Artifact Changelog | ||
# uses: actions/[email protected] | ||
# with: | ||
# name: Changelog.txt | ||
# path: ${{ github.workspace }}/artifact | ||
|
||
- name: Read Changelog | ||
working-directory : ${{ github.workspace }}/artifact | ||
run : | | ||
echo "Read Changelog" | ||
echo "CHANGELOG=$(cat Changelog.txt)" >> $GITHUB_ENV | ||
# - name: Read Changelog | ||
# working-directory : ${{ github.workspace }}/artifact | ||
# run : | | ||
# echo "Read Changelog" | ||
# echo "CHANGELOG=$(cat Changelog.txt)" >> $GITHUB_ENV | ||
|
||
- name: Output Changelog | ||
run : | | ||
echo "Output Changelog" | ||
echo "${{ env.CHANGELOG }}" | ||
# - name: Output Changelog | ||
# run : | | ||
# echo "Output Changelog" | ||
# echo "${{ env.CHANGELOG }}" | ||
|
||
- name: Download Artifact APK | ||
uses: actions/[email protected] | ||
|