-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.34 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (48 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release --target ${{ matrix.target }} -p codeindex
- name: Package
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/codeindex dist/
cd dist && tar czf codeindex-${{ matrix.target }}.tar.gz codeindex
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: codeindex-${{ matrix.target }}
path: dist/codeindex-${{ matrix.target }}.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*.tar.gz
generate_release_notes: true