Skip to content

v0.0.1-alpha.2

v0.0.1-alpha.2 #13

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ${{ matrix.job.os }}
env:
PROJECT_NAME: point_tiler
strategy:
fail-fast: false
matrix:
job:
- {os: macos-latest, target: x86_64-apple-darwin, extension: ''}
- {os: macos-latest, target: aarch64-apple-darwin, extension: ''}
- {os: ubuntu-latest, target: x86_64-unknown-linux-gnu, extension: ''}
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
targets: |
x86_64-apple-darwin
aarch64-apple-darwin
x86_64-unknown-linux-gnu
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release --package app --target ${{ matrix.job.target }}
- name: Rename artifact
run: |
mv ./target/${{ matrix.job.target }}/release/app \
./target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.job.target }}${{ matrix.job.extension }}
- name: Upload artifact to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.job.target }}${{ matrix.job.extension }}
asset_name: ${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.job.target }}${{ matrix.job.extension }}
asset_content_type: application/octet-stream