From fd11fd31ff26685b43ebc3ef9e6ed5e360337cac Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Wed, 28 Jun 2023 21:24:00 +0200 Subject: [PATCH] Add CI/CD --- .forgejo/workflows/build-release.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .forgejo/workflows/build-release.yml diff --git a/.forgejo/workflows/build-release.yml b/.forgejo/workflows/build-release.yml new file mode 100644 index 0000000..b1d6c9b --- /dev/null +++ b/.forgejo/workflows/build-release.yml @@ -0,0 +1,33 @@ +name: "Build and publish releases" + +on: + push: + tags: "v*" + +jobs: + release: + if: github.repository_owner == 'mc' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: github.com/actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: "build" + run: | + ./gradlew build + + - name: "move releases" + run: | + mkdir release + mv build/libs/*.jar release + + - name: "publish release" + uses: https://code.forgejo.org/actions/forgejo-release@v1 + with: + direction: upload + release-dir: release + token: ${{ secrets.TOKEN }}