623fa5d709
annoyingly, github actions can't skip pull request checks and it cannot commit to the main branch due to protection, so we have to MANUALLY accept the changes in. on the bright side, we can check what it's generated in case it's wrong.
38 lines
No EOL
1.3 KiB
YAML
38 lines
No EOL
1.3 KiB
YAML
name: Update metainfo on release
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
|
|
|
|
- name: Use Node.js 18
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install dependencies
|
|
run: pnpm i
|
|
|
|
- name: Update metainfo
|
|
run: pnpm updateMeta
|
|
|
|
- name: Commit and merge in changes
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git checkout -b ci/meta-update
|
|
git add meta/dev.vencord.Vesktop.metainfo.xml
|
|
git commit -m "Insert release changes for ${{ github.event.release.tag_name }}"
|
|
git push origin ci/meta-update
|
|
gh pr create -B main -H ci/meta-update -t "Metainfo for ${{ github.event.release.tag_name }}" -b "This PR updates the metainfo for release ${{ github.event.release.tag_name }}. @lewisakura @Vendicated"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |