-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically update manifest after release
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 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,35 @@ | ||
name: Update flatpak manifest | ||
on: | ||
push: | ||
branches: [update-flatpak-manifest-pr] | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
update-manifest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Replace sha512sum | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq eval -i '.modules.[0].sources.[0].url = "https://github.com/swsnr/turnon/archive/refs/tags/$GITHUB_REF_NAME.tar.gz"' flatpak/de.swsnr.turnon.yaml | ||
- name: Replace sha512sum | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq eval -i '.modules.[0].sources.[0].sha512 = "$ARCHIVE_SHA512"' flatpak/de.swsnr.turnon.yaml | ||
- run: echo ARCHIVE_SHA512="$(curl https://github.com/swsnr/turnon/archive/refs/tags/v1.1.0.tar.gz | sha512sum | cut -d' ' -f1)" >> "$GITHUB_ENV" | ||
- name: Substitute environment variables | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq eval -i '(.. | select(tag == "!!str")) |= envsubst' flatpak/de.swsnr.turnon.yaml | ||
- run: git diff | ||
# - uses: peter-evans/create-pull-request@v7 | ||
# with: | ||
# commit-message: "Update flatpak manifest for ${{ github.ref_name }}" | ||
# branch: update-flatpak-manifest | ||
# sign-commits: true | ||
# delete-branch: true | ||
# title: "Update flatpak manifest for ${{ github.ref_name }}" | ||
# body: "Automated update of flatpak manifest for release ${{ github.ref_name }}" | ||
# assignees: swsnr |