Skip to content

Commit

Permalink
build(ci): add archive builds [#87]
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenwinch committed Jun 24, 2024
1 parent ef80aa4 commit 67390d9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout
uses: actions/checkout@v4
with:
ref: "archives"
path: "archives"

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

Expand Down Expand Up @@ -115,3 +121,20 @@ jobs:
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get short SHA
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV

- name: Backup pre-release on archives branch
run: |
mkdir -p $GITHUB_WORKSPACE/archives/${{ env.VERSION }}
cp flixclusive-release.apk $GITHUB_WORKSPACE/archives/${{ env.VERSION }}/PR-${{ env.SHORT_SHA }}.apk
- name: Push pre-release apk archives
run: |
cd $GITHUB_WORKSPACE/archives
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add $GITHUB_WORKSPACE/archives/${{ env.VERSION }}/PR-${{ env.SHORT_SHA }}.apk
git commit -m "Archive PR-${{ env.SHORT_SHA }}" || exit 0
git push

0 comments on commit 67390d9

Please sign in to comment.