Skip to content

v2.0.4

v2.0.4 #122

Workflow file for this run

name: Build Release
on:
push:
tags:
- v*
branches:
- test-release/*
jobs:
get-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- id: version
run: echo "version=${ref##test-release/}" >> $GITHUB_OUTPUT
env:
ref: ${{ github.ref_name }}
build-releases:
name: Build release
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- docker: amd64
arch: x86_64
- docker: arm64/v8
arch: aarch64
- docker: arm/v7
arch: armv7h
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
with:
platforms: all
- uses: docker/setup-buildx-action@v3
with:
version: latest
install: true
- run: docker build --platform=linux/${{ matrix.platform.docker }} -o . .
- uses: actions/upload-artifact@v3
with:
name: paru-${{ matrix.platform.arch }}
path: paru.tar.zst
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build-releases, get-version]
outputs:
release-url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Create Release
id: create-release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.get-version.outputs.version }}
release_name: Paru v${{ needs.get-version.outputs.version }}
draft: true
prerelease: false
upload-binaries:
name: Upload binaries to Githib relase
runs-on: ubuntu-latest
needs: [release, get-version]
strategy:
matrix:
arch: [x86_64, aarch64, armv7h]
steps:
- uses: actions/download-artifact@v3
with:
name: paru-${{ matrix.arch }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.release-url }}
asset_name: paru-${{ needs.get-version.outputs.version }}-${{ matrix.arch }}.tar.zst
asset_path: paru.tar.zst
asset_content_type: application/tar+zstd