Skip to content

Better README

Better README #25

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
platform: [ linux/amd64, linux/arm64, linux/arm/v5, linux/arm/v6, linux/arm/v7, linux/386, darwin/amd64, darwin/arm64, windows/amd64, windows/386 ]
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v4
- name: Load version
id: version
run: |
source .version
echo "TAGLIB_VERSION=$TAGLIB_VERSION" >> $GITHUB_ENV
echo "TAGLIB_SHA=$TAGLIB_SHA" >> $GITHUB_ENV
- name: Set DOCKER_BUILD_SUMMARY
run: |
if [[ ${{ github.ref }} == refs/tags/v* ]]; then
echo "DOCKER_BUILD_SUMMARY=false" >> $GITHUB_ENV
else
echo "DOCKER_BUILD_SUMMARY=true" >> $GITHUB_ENV
fi
- name: Build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: ${{ matrix.platform }}
outputs: |
type=local,dest=./output
target: artifact
build-args: |
TAGLIB_VERSION=${{ env.TAGLIB_VERSION }}
TAGLIB_SHA=${{ env.TAGLIB_SHA }}
- name: Sanitize platform name
id: set-platform
run: |
PLATFORM=$(echo ${{ matrix.platform }} | tr '/' '-')
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
- name: Create artifact
id: create-artifact
run: |
mkdir -p ./dist
tar -czf ./dist/taglib-${{ env.PLATFORM }}.tar.gz -C ./output .
- uses: actions/upload-artifact@v4
with:
name: taglib-${{ env.PLATFORM }}
path: ./dist
retention-days: 7
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: ./dist
pattern: taglib-*
merge-multiple: true
- run: ls -lR ./dist
- name: Generate checksums
run: |
cd ./dist
sha256sum * > checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: ./dist/*
generate_release_notes: true
make_latest: true