Skip to content

Release Announcement #9

Release Announcement

Release Announcement #9

name: Release Announcement
on:
push:
tags:
- 'v[0-9]*.[0-9]*'
- 'v[0-9]*.[0-9]*_*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to simulate (ex: v26.6)'
required: true
default: 'v26.6'
jobs:
announce:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Parse tag and build release notes
id: parse
run: |
TAG="${{ github.event.inputs.tag || github.ref_name }}"
VERSION="${TAG#v}"
VERSION="${VERSION%%_*}"
YEAR="20${VERSION%%.*}"
MONTH=$(printf "%02d" "${VERSION##*.}")
echo "short_version=$VERSION" >> "$GITHUB_OUTPUT"
echo "iso_url=https://iso.pearos.xyz/iso/pearOS-NiceC0re-${YEAR}.${MONTH}-x86_64.iso" >> "$GITHUB_OUTPUT"
echo "sha=$(cat sha.txt)" >> "$GITHUB_OUTPUT"
NOTES=$(awk '
/^#+ [0-9]+ [A-Za-z]+ [0-9]{4}/ { count++; if (count == 2) exit }
count == 1 { print }
' release_notes.md | \
sed 's|^### Known Bugs$|**⚠️ Known Bugs:**|' | \
sed 's|^## Information$||' | \
sed 's|^#\{1,3\} \([0-9][^*]*\)|**\1**|' | \
sed 's|^\* |- |' | \
grep -v '^https://' | \
grep -v '^[[:space:]]*$' | \
head -25)
{
echo 'notes<<EOF'
echo "$NOTES"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Announce on Discord
uses: sarisia/actions-status-discord@v1.16.0
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
nodetail: true
noprefix: true
title: "pearOS NiceC0re ${{ steps.parse.outputs.short_version }} is out!"
description: |
A new release of pearOS is available!
**Download:** https://pearos.xyz
**SHA256:** `${{ steps.parse.outputs.sha }}`
**What's new:**
${{ steps.parse.outputs.notes }}
**Bug reports:** #nicec0re-bugs-report or https://github.com/pearOS-archlinux/iso/issues
color: 0xf5a623
username: pearOS Releases