summary refs log tree commit diff
path: root/.github/workflows/main.yml
diff options
context:
space:
mode:
authorwlodekm <[email protected]>2024-11-15 09:47:27 +0200
committerwlodekm <[email protected]>2024-11-15 09:47:27 +0200
commit4edf808f43e431c21fd9d2c35f981878a53730b5 (patch)
tree7df09ca1eaf2767c78d3a2a26f482c5e17f02b14 /.github/workflows/main.yml
parentd28d8333ebe71e2937660b13d9afb1d516cf14f0 (diff)
parent5935ac2c797549133f525d6076bcca4b458b8a4b (diff)
Merge branch 'main' of https://github.com/WlodekM/meower-cl
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r--.github/workflows/main.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..560f22f
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,51 @@
+name: Build and Release
+
+on:
+  push:
+    tags:
+      - 'v*'  # Trigger the workflow when a tag starting with 'v' is pushed (e.g., v1.0.0)
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v3
+
+    - name: Set up Deno
+      uses: denoland/setup-deno@v3
+      with:
+        deno-version: 'v2.0.6'  # specify the version of Deno you want to use
+
+    - name: Make shell script executable
+      run: chmod +x ./buildall.sh
+
+    - name: Run buildall.sh
+      run: ./buildall.sh
+
+    - name: Upload build artifacts
+      uses: actions/upload-artifact@v3
+      with:
+        name: compressed-files
+        path: build/compressed/*  # Upload the files in the build/compressed directory
+
+  release:
+    needs: build
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v3
+
+    - name: Create GitHub Release
+      uses: ghcli/release-action@v1
+      with:
+        tag_name: ${{ github.ref }}  # Use the pushed tag as the release version
+        release_name: Release ${{ github.ref }}
+        body: "Automated release for version ${{ github.ref }}"
+      
+    - name: Upload release assets
+      uses: softprops/action-gh-release@v1
+      with:
+        files: build/compressed/*  # Upload the files to the GitHub release