Skip to content

Sync with upstream #461

Sync with upstream

Sync with upstream #461

Workflow file for this run

# https://github.com/kenvandine/element-desktop/blob/main/.github/workflows/sync-release.yml
name: Sync with upstream
on:
# Runs at 15:00 UTC every day
schedule:
- cron: '0 15 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
- name: Fetch release version
run: |
VERSION=$(
curl -sL https://api.github.com/repos/PrismLauncher/PrismLauncher/releases |
jq . | grep tag_name | grep -v beta | grep -v rc | head -n 1 | cut -d'"' -f4 | tr -d 'v'
)
echo "VERSION=$VERSION" >> $GITHUB_ENV
if [ ${#VERSION} -gt 0 ]; then
sed -i 's/\(\s*source-tag: \).*$/\1"'"$VERSION"'"/' snap/snapcraft.yaml
fi
- name: Check for modified files
id: git-check
run: |
MODIFIED=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
echo "modified=$MODIFIED" >> $GITHUB_OUTPUT
- name: Commit latest release version
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.name 'ashuntu'
git config --global user.email '101582426+ashuntu@users.noreply.github.com'
git commit -am "auto: Update to ${{ env.VERSION }}"
git push