From d6f4fdaa5b0b54b9e34268efa08f85071521893a Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Mon, 21 Oct 2024 08:30:24 +0200 Subject: [PATCH] add CI/CD --- .gitea/workflows/publish.yaml | 24 ++++++++++++++++++++++++ Cargo.toml | 13 ++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/publish.yaml diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml new file mode 100644 index 0000000..bff4565 --- /dev/null +++ b/.gitea/workflows/publish.yaml @@ -0,0 +1,24 @@ +name: publish package +on: + push: + branches: + - main + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: run tests + run: | + cd ${{ gitea.workspace }} + cargo test --release + - name: build & release package + run: | + cd ${{ gitea.workspace }} + cargo build --release + cargo deb + ls -al target/debian + UPLOAD_FILE=$(ls target/debian/*.deb) + curl --user jlusiardi:${{ secrets.UPLOAD_TOKEN }} --upload-file ${UPLOAD_FILE} https://gitea.intern.haus-in-hirschaid.de/api/packages/jlusiardi/debian/pool/bionic/main/upload diff --git a/Cargo.toml b/Cargo.toml index f091534..075e7eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,4 +10,15 @@ ratatui = "0.28.1" crossterm = "0.28.1" rand = "0.8.5" petgraph = "0.6.5" -whoami = "1.5.2" \ No newline at end of file +whoami = "1.5.2" + +[package.metadata.deb] +maintainer = "Joachim Lusiardi " +copyright = "2024, Joachim Lusiardi " +extended-description = """Little roguelike game""" +depends = "$auto" +section = "game" +priority = "optional" +assets = [ + ["target/release/el_diabolo", "/usr/bin/", "755"], +] \ No newline at end of file