Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions .github/workflows/push-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:

update-release:
name: Update Draft Release
needs: [ common, android, ios, windows, linux, macos ]
needs: [ common, android, ios, windows, linux, linux-arm64, macos ]
runs-on: ubuntu-latest
steps:
- name: Run Release Drafter
Expand Down Expand Up @@ -336,7 +336,8 @@ jobs:

echo "Removing previous files from branch"

rm -rf *.deb *.rpm
find . -maxdepth 1 -type f -name '*.deb' ! -name '*arm64*' -delete
find . -maxdepth 1 -type f -name '*.rpm' ! -name '*aarch64*' -delete

echo "Copying new build files"

Expand All @@ -352,6 +353,48 @@ jobs:
git branch -m apk
git push --force origin apk

linux-arm64:
name: Linux ARM64 Flutter Build
needs: common
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4

- name: Linux ARM64 Workflow
uses: ./.github/actions/linux-arm64
with:
VERSION_NAME: ${{needs.common.outputs.VERSION_NAME}}
VERSION_CODE: ${{needs.common.outputs.VERSION_CODE}}

- name: Upload packages to apk branch
if: ${{ github.repository == 'fossasia/pslab-app' }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

git clone --branch=apk https://${{ github.repository_owner }}:${{ github.token }}@github.com/${{ github.repository }} apk
cd apk

branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}

echo "Removing previous files from branch"

rm -rf *arm64*.deb *aarch64*.rpm

echo "Copying new build files"

cp -v ../*.deb .
cp -v ../*.rpm .

echo "Pushing to apk branch"

git checkout --orphan temporary
git add --all .
git commit -am "[Auto] Update Linux ARM64 Packages from $branch ($(date +%Y-%m-%d.%H:%M:%S))"
git branch -D apk
git branch -m apk
git push --force origin apk
Comment on lines +391 to +396
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux-arm64 updates the apk branch by creating an orphan commit and git push --force. Because other jobs in this same workflow (e.g., linux, windows, macos) also do the same in parallel, this job can overwrite their updates with a stale clone (last-writer-wins), even though the deletion patterns are now arch-specific. Serialize all apk publishing (e.g., workflow/job concurrency group shared by all publishing jobs, or a single dedicated publish job that runs after all builds and pushes once).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behavior was not introduced by this PR. I created #3140 to track this issue.


macos:
name: macOS Flutter Build
needs: common
Expand Down
Loading