Add release workflow
stable / fmt
Details
stable / fmt
Details
This commit is contained in:
parent
a8bb7018b5
commit
6aa804a0e5
|
|
@ -14,23 +14,4 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: cargo fmt --check
|
- name: cargo fmt --check
|
||||||
run: cargo fmt --check --all
|
run: cargo fmt --check --all
|
||||||
cross:
|
|
||||||
runs-on: rust-cross
|
|
||||||
name: stable / cross-${{ matrix.target }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target: ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu"]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: cross compile for ${{ matrix.target }}
|
|
||||||
run: cross build --target ${{ matrix.target }} --release
|
|
||||||
- uses: actions/release-action@main
|
|
||||||
with:
|
|
||||||
files: |-
|
|
||||||
target/${{ matrix.target }}/release/crabidy-server
|
|
||||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
name: CI release
|
||||||
|
run-name: CI release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: rust-cross
|
||||||
|
name: stable / cross-${{ matrix.target }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
target: ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: cargo fmt --check
|
||||||
|
- name: cross compile for ${{ matrix.target }}
|
||||||
|
run: cross build --target ${{ matrix.target }} --release
|
||||||
|
- uses: actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
target/${{ matrix.target }}/release/crabidy-server
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||||
|
pre_release: true
|
||||||
|
|
@ -73,7 +73,7 @@ where
|
||||||
if let Some(config_dir) = dirs::config_dir() {
|
if let Some(config_dir) = dirs::config_dir() {
|
||||||
let dir = Path::new(&config_dir).join("crabidy");
|
let dir = Path::new(&config_dir).join("crabidy");
|
||||||
if !dir.is_dir() {
|
if !dir.is_dir() {
|
||||||
create_dir_all(&dir);
|
create_dir_all(&dir).expect("Could not create crabidy config directory");
|
||||||
}
|
}
|
||||||
let config_file_path = dir.join(config_file_name);
|
let config_file_path = dir.join(config_file_name);
|
||||||
if !config_file_path.is_file() {
|
if !config_file_path.is_file() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue