Skip to content

fix: release ci

fix: release ci #12

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-latest-arm64]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Build
run: cargo build --release
- name: Check if Release Exists
id: check_release
run: |
if gh release view ${{ github.ref }} > /dev/null 2>&1; then
echo "release_exists=true" >> $GITHUB_ENV
else
echo "release_exists=false" >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Create Release
if: env.release_exists == 'false'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/screenpipe
asset_name: screenpipe-${{ matrix.os }}
asset_content_type: application/octet-stream