Skip to content

fix: relink drift anchors after workflow changes #13

fix: relink drift anchors after workflow changes

fix: relink drift anchors after workflow changes #13

Workflow file for this run

name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
generate-notes:
name: Generate release notes
runs-on: ubuntu-22.04
outputs:
body: ${{ steps.cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate changelog
id: cliff
uses: orhun/git-cliff-action@v4
with:
args: --latest --strip header
build:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-macos
runner: macos-latest
zig-target: aarch64-macos
- target: x86_64-macos
runner: macos-latest
zig-target: x86_64-macos
- target: x86_64-linux
runner: ubuntu-22.04
zig-target: x86_64-linux-gnu
zig-cpu: baseline
- target: aarch64-linux
runner: ubuntu-22.04
zig-target: aarch64-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- name: Build
run: zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.zig-target }} ${{ matrix.zig-cpu && format('-Dcpu={0}', matrix.zig-cpu) || '' }}
- name: Package
run: |
tar -czf drift-${{ matrix.target }}.tar.gz -C zig-out/bin drift
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: drift-${{ matrix.target }}
path: drift-${{ matrix.target }}.tar.gz
release:
name: Create release
needs: [generate-notes, build]
runs-on: ubuntu-22.04
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: ${{ needs.generate-notes.outputs.body }}
prerelease: false
files: drift-*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}