diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index e964780..febf822 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -14,23 +14,4 @@ jobs: - uses: actions/checkout@v3 - name: cargo fmt --check 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}}' - - - diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..ad07193 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,25 @@ +name: CI release +run-name: CI release +on: + push: + tags: + +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 diff --git a/crabidy-core/src/lib.rs b/crabidy-core/src/lib.rs index 92d6697..f9ce8ca 100644 --- a/crabidy-core/src/lib.rs +++ b/crabidy-core/src/lib.rs @@ -73,7 +73,7 @@ where if let Some(config_dir) = dirs::config_dir() { let dir = Path::new(&config_dir).join("crabidy"); 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); if !config_file_path.is_file() {