From b668665f46ceb22addd9673770fa95208806a498 Mon Sep 17 00:00:00 2001
From: Tammy DiPrima <tammy.diprima@stonybrook.edu>
Date: Tue, 30 Apr 2024 09:38:50 -0400
Subject: [PATCH] GitHub actions

---
 .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 .github/workflows/main.yml

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..7a8b1741
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,33 @@
+name: Maven build
+on:
+  release:
+    types: [created]
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout main branch from GitHub
+        uses: actions/checkout@v4
+
+      - name: Set up JDK
+        uses: actions/setup-java@v4
+        with:
+          java-version: '21'
+          distribution: 'adopt'
+
+      - name: Build Maven Project
+        run: mvn -B package --file pom.xml
+
+      - name: List current directory
+        run: ls -laF
+
+      - name: List target directory
+        run: |
+          ls -laF Halcyon
+          ls -laF Halcyon/target
+
+      - name: '📦 Upload Package'
+        run: gh release upload ${{github.event.release.tag_name}} Halcyon/target/Halcyon*.jar
+        env:
+          GITHUB_TOKEN: ${{ github.TOKEN }}
+        shell: bash