Skip to content

Commit 944a357

Browse files
committed
init
0 parents  commit 944a357

11 files changed

Lines changed: 958 additions & 0 deletions

File tree

.github/workflows/cd.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags: ["v[0-9]+.[0-9]+.[0-9]+*"]
7+
8+
jobs:
9+
build-release:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
# Linux
16+
- os: ubuntu-latest
17+
target: x86_64-unknown-linux-musl
18+
- os: ubuntu-latest
19+
target: aarch64-unknown-linux-musl
20+
- os: ubuntu-latest
21+
target: arm-unknown-linux-musleabihf
22+
23+
# Darwin
24+
- os: macos-latest
25+
target: x86_64-apple-darwin
26+
- os: macos-latest
27+
target: aarch64-apple-darwin
28+
29+
# Windows
30+
- os: windows-latest
31+
target: x86_64-pc-windows-msvc
32+
ext: .exe
33+
34+
steps:
35+
- name: Checkout repo
36+
uses: actions/checkout@v2
37+
38+
- name: Setup Rust toolchain
39+
uses: actions-rs/toolchain@v1
40+
with:
41+
profile: minimal
42+
override: true
43+
target: ${{ matrix.target }}
44+
toolchain: stable
45+
46+
- name: Build
47+
uses: actions-rs/cargo@v1
48+
with:
49+
use-cross: true
50+
command: build
51+
args: --release --target ${{ matrix.target }}
52+
53+
- name: Rename Artifacts
54+
shell: bash
55+
run: |
56+
ver=${GITHUB_REF#refs/tags/}
57+
ASSET_PATH=ghostwriter-$ver-${{ matrix.target }}${{ matrix.ext }}
58+
mv target/${{ matrix.target }}/release/ghostwriter $ASSET_PATH
59+
echo "ASSET_PATH=$ASSET_PATH" >> $GITHUB_ENV
60+
- name: Release
61+
uses: softprops/action-gh-release@v1
62+
if: startsWith(github.ref, 'refs/tags/')
63+
with:
64+
files: ${{ env.ASSET_PATH }}
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
/timeline

0 commit comments

Comments
 (0)