-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructure ci to not rebuild when nothing changed
- Loading branch information
1 parent
67988b2
commit 5dda7bb
Showing
4 changed files
with
81 additions
and
67 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,60 @@ | ||
name: deploy | ||
|
||
inputs: | ||
branch: | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: deploy | ||
fetch-depth: 0 | ||
|
||
- name: Setup git | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
name: ${{ matrix.branch }} | ||
|
||
- name: Copy artifacts | ||
run: | | ||
mv -f artifacts/app-release.apk ${{ matrix.branch }}/app-release.apk | ||
mv -f artifacts/app-debug.apk ${{ matrix.branch }}/app-debug.apk | ||
mv -f artifacts/stub-release.apk ${{ matrix.branch }}/stub-release.apk | ||
rm -r artifacts | ||
- name: Run helper script | ||
run: | | ||
git checkout origin/ci-management releasehelper.sh | ||
chmod +x releasehelper.sh | ||
./releasehelper.sh ${{ matrix.branch }} | ||
mv -f ${{ matrix.branch }}.json docs | ||
mv -f note.md ${{ matrix.branch }}/note.md | ||
rm releasehelper.sh | ||
- name: Commit update | ||
run: | | ||
git restore --staged . | ||
git add ${{ matrix.branch }}/app-release.apk | ||
git add ${{ matrix.branch }}/app-debug.apk | ||
git add ${{ matrix.branch }}/stub-release.apk | ||
git add ${{ matrix.branch }}/note.md | ||
git add docs/${{ matrix.branch }}.json | ||
git commit --amend -m "Update ${{ matrix.branch }} ${{ env.VERSION }}" | ||
- name: Push result | ||
uses: ad-m/[email protected] | ||
with: | ||
branch: deploy | ||
force_with_lease: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository }} |
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
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
This file was deleted.
Oops, something went wrong.