Fix release action #13
Workflow file for this run
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
on: | |
push: | |
tags: | |
"*" | |
name: Publish Release | |
concurrency: | |
group: release-${{ github.sha }} | |
jobs: | |
publish-release: | |
name: Publish Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download workflow artifact | |
uses: dawidd6/action-download-artifact@v3.0.0 | |
with: | |
workflow: ci.yml | |
commit: ${{ github.sha }} | |
- name: Get release notes | |
shell: python | |
run: | | |
import re, textwrap | |
open_file = open("./data/page.kramo.Hyperplane.metainfo.xml.in", "r", encoding="utf-8") | |
string = open_file.read() | |
open_file.close() | |
string = re.findall("<release.*>\s*<description.*>\n([\s\S]*?)\s*</description>\s*<\/release>", string)[0] | |
string = textwrap.dedent(string) | |
open_file = open("release_notes", "w", encoding="utf-8") | |
open_file.write(string) | |
open_file.close() | |
- name: Get tag name | |
id: get_tag_name | |
run: echo tag_name=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT | |
- name: Rename bundles | |
id: rename_bundles | |
run: | | |
mv page.kramo.Hyperplane.Devel-x86_64/page.kramo.Hyperplane.Devel.flatpak page.kramo.Hyperplane.Devel-x86_64.flatpak | |
mv page.kramo.Hyperplane.Devel-aarch64/page.kramo.Hyperplane.Devel.flatpak page.kramo.Hyperplane.Devel-aarch64.flatpak | |
- name: Publish release | |
uses: softprops/action-gh-release@v0.1.15 | |
with: | |
files: | | |
page.kramo.Hyperplane.Devel-x86_64.flatpak | |
page.kramo.Hyperplane.Devel-aarch64.flatpak | |
tag_name: ${{ steps.get_tag_name.outputs.tag_name }} | |
body_path: release_notes |