Skip to content

release

release #2

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cargo test
run: cargo test --locked
- name: Cargo build
run: cargo build --release --locked
- name: Package binary
id: package
run: |
BIN=plausible
ARCHIVE="${BIN}-${{ matrix.os }}.tar.gz"
tar -C target/release -czf "$ARCHIVE" "$BIN"
echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-bundle
path: ${{ steps.package.outputs.archive }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*