Skip to content

Release

Release #9

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: ''}
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
- 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
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