Skip to content

v0.3.1

v0.3.1 #28

Workflow file for this run

# https://github.com/localsend/localsend/blob/135939850291f6d15c984307cc9186f2ac5c9b36/.github/workflows/release.yml
# https://github.com/kra-mo/cartridges/blob/2801e777f785428614dab48cb6aa79068dc8ee67/.github/workflows/ci.yml
name: Publish Release
on:
push:
tags: ["*"]
concurrency:
group: release-${{ github.sha }}
jobs:
build:
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Get version from pubspec.yaml
id: get_version
run: |
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' pubspec.yaml)
echo "version=$VERSION" >> $GITHUB_OUTPUT
release:
needs:
- build
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: ci.yml
commit: ${{ github.sha }}
- name: Test
run: ls --recursive
- name: Move Android zip to root
run: mv Android\ APK/*.zip Sly-${{ needs.build.outputs.version }}-Android.zip
- name: Move Linux tar.gz to root
run: mv Linux\ Binary/* Sly-${{ needs.build.outputs.version }}-Linux.tar.gz
- name: Move macOS zip to root
run: mv macOS\ Application/*.zip Sly-${{ needs.build.outputs.version }}-macOS.zip
- name: Move Windows MSIX to root
run: mv Windows\ Installer/*.msix Sly-${{ needs.build.outputs.version }}-Windows.msix
- name: Get tag name
id: get_tag_name
run: echo tag_name=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
- name: Get release notes
shell: python
run: |
import re, textwrap
open_file = open("./packaging/linux/page.kramo.Sly.metainfo.xml", "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: Publish release
uses: softprops/action-gh-release@v2.0.8
with:
files: |
Sly-${{ needs.build.outputs.version }}-Android.zip
Sly-${{ needs.build.outputs.version }}-Linux.tar.gz
Sly-${{ needs.build.outputs.version }}-macOS.zip
Sly-${{ needs.build.outputs.version }}-Windows.msix
fail_on_unmatched_files: true
tag_name: ${{ steps.get_tag_name.outputs.tag_name }}
body_path: release_notes