Skip to content

v0.2.1

v0.2.1 #9

Workflow file for this run

name: Build and release
on:
push:
branches:
- master
tags:
- v*
env:
APP_ID: feedmash
jobs:
build-linux:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
persist-credentials: false
- name: Setup
uses: actions/setup-go@v5.0.2
with:
go-version: "1.22.2"
- name: Build
run: ./build-unix.sh
- name: Archive
run: tar -cf- "$APP_ID" | xz -c9e - > "$APP_ID-linux.tar.xz"
- name: Save
uses: actions/upload-artifact@v4.3.4
with:
name: release-linux
path: "*.tar.xz"
build-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
persist-credentials: false
- name: Setup
uses: actions/setup-go@v5.0.2
with:
go-version: "1.22.2"
- name: Build
run: .\build-windows.ps1
- name: Archive
run: Compress-Archive -Path "$Env:APP_ID.exe" -DestinationPath "$Env:APP_ID-windows.zip"
- name: Save
uses: actions/upload-artifact@v4.3.4
with:
name: release-windows
path: "*.zip"
build-macos:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
with:
persist-credentials: false
- name: Setup
uses: actions/setup-go@v5.0.2
with:
go-version: "1.22.2"
- name: Build
run: ./build-unix.sh
- name: Archive
run: tar -cf- "$APP_ID" | xz -c9e - > "$APP_ID-macos.tar.xz"
- name: Save
uses: actions/upload-artifact@v4.3.4
with:
name: release-macos
path: "*.tar.xz"
release:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build-linux
- build-windows
- build-macos
runs-on: ubuntu-24.04
steps:
- name: Version
id: version
run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@v4.1.7
with:
persist-credentials: false
- name: Notes
run: grep -Pzom1 "(?s)\n[##\s]*${{ steps.version.outputs.version }}.*?\n+.*?\K.*?(\n\n|$)" CHANGELOG.md | sed 's/[^[:print:]]//g' > RELEASE.md
- name: Download
uses: actions/download-artifact@v4.1.8
with:
path: artifacts
- name: Rename
run: |
mv "artifacts/release-linux/$APP_ID-linux.tar.xz" "artifacts/release-linux/$APP_ID-linux-${{ steps.version.outputs.version }}.tar.xz"
mv "artifacts/release-windows/$APP_ID-windows.zip" "artifacts/release-windows/$APP_ID-windows-${{ steps.version.outputs.version }}.zip"
mv "artifacts/release-macos/$APP_ID-macos.tar.xz" "artifacts/release-macos/$APP_ID-macos-${{ steps.version.outputs.version }}.tar.xz"
- name: Release
uses: softprops/action-gh-release@v2.0.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
artifacts/release-linux/*.tar.xz
artifacts/release-windows/*.zip
artifacts/release-macos/*.tar.xz
body_path: RELEASE.md