From 16629d965802067bcb666ad826038f26c73e3115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=A2=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D1=85=D0=BE=D0=B2?= Date: Sun, 12 May 2024 12:20:29 +0400 Subject: [PATCH] build: automated the release creation --- .github/workflows/mvn.yml | 2 +- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/mvn.yml b/.github/workflows/mvn.yml index da7ce25..565149e 100644 --- a/.github/workflows/mvn.yml +++ b/.github/workflows/mvn.yml @@ -1,5 +1,5 @@ --- -name: mvn +name: Build & Test on: push: branches: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7b2553c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +--- +name: "Release" +on: + push: + tags: + - 'v*' + +jobs: + tagged-release: + name: "Tagged Release" + runs-on: {{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-latest"] + java: [17] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-jdk-${{ matrix.java }}-maven- + - run: java -version + - run: mvn -version + - run: mvn --errors --batch-mode clean package -DskipTests=true + - run: mv target/*-jar-with-dependencies.jar target/logic-checker.jar + - uses: ncipollo/release-action@v1 + with: + artifacts: "release.tar.gz,target/logic-checker.jar" \ No newline at end of file