diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml deleted file mode 100644 index 815f419..0000000 --- a/.gitea/workflows/build.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build .deb - -on: workflow_call - -env: - SCCACHE_GHA_ENABLED: "true" - RUSTC_WRAPPER: "sccache" - -jobs: - Build-Deb: - runs-on: aarch64 - steps: - - name: Check out repository code - uses: actions/checkout@v3 - with: - submodules: "recursive" - - name: Select rustup channel - run: "rustup default stable" - - name: Update toolchain - run: "rustup target add aarch64-unknown-linux-musl" - - name: Install cargo-deb - run: "cargo install --locked cargo-deb" - - name: Build - run: "cargo build --release --target=aarch64-unknown-linux-musl" - - name: Build .deb - run: "cargo deb --target=aarch64-unknown-linux-musl" - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: release - path: | - ./target/aarch64-unknown-linux-musl/debian/*.deb - ./target/aarch64-unknown-linux-musl/release/tesla-charge-controller diff --git a/.gitea/workflows/deb.yaml b/.gitea/workflows/deb.yaml index 90b909e..f0bc944 100644 --- a/.gitea/workflows/deb.yaml +++ b/.gitea/workflows/deb.yaml @@ -6,16 +6,25 @@ on: - "v[0-9]+.[0-9]+.[0-9]+" jobs: - Build: - uses: ./.gitea/workflows/build.yaml - Release: runs-on: aarch64 steps: - - name: Download artifacts - uses: actions/download-artifact@v4 + - name: Check out repository code + uses: actions/checkout@v3 + with: + submodules: "recursive" + - name: Select rustup channel + run: "rustup default stable" + - name: Update toolchain + run: "rustup target add aarch64-unknown-linux-musl" + - name: Install cargo-deb + run: "cargo install --locked cargo-deb" + - name: Build + run: "cargo build --release --target=aarch64-unknown-linux-musl" + - name: Build .deb + run: "cargo deb --target=aarch64-unknown-linux-musl" - name: Add .deb to apt repository - run: "curl --user alex:${{ secrets.PACKAGING_TOKEN }} --upload-file $(ls -t ./release/*.deb | head -1) https://git.alexjanka.com/api/packages/alex/debian/pool/testing/main/upload" + run: "curl --user alex:${{ secrets.PACKAGING_TOKEN }} --upload-file $(ls -t ./target/aarch64-unknown-linux-musl/debian/*.deb | head -1) https://git.alexjanka.com/api/packages/alex/debian/pool/testing/main/upload" - name: "Release package" id: use-go-action uses: https://gitea.com/actions/release-action@main diff --git a/.gitea/workflows/pre.yaml b/.gitea/workflows/pre.yaml deleted file mode 100644 index c764156..0000000 --- a/.gitea/workflows/pre.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Build prerelease .deb - -on: - push: - tags: - - "*-pre" - -jobs: - Build: - uses: ./.gitea/workflows/build.yaml