From f1f31583ff7054f3b7272ba9e33880a276d1b1af Mon Sep 17 00:00:00 2001
From: belliash <belliash@codingworkshop.eu.org>
Date: Sun, 26 Mar 2023 20:32:49 +0200
Subject: [PATCH] Initial version of Gitea Actions

---
 .build.yml                  | 14 --------------
 .github/workflows/build.yml | 23 +++++++++++++++++++++++
 2 files changed, 23 insertions(+), 14 deletions(-)
 delete mode 100644 .build.yml
 create mode 100644 .github/workflows/build.yml

diff --git a/.build.yml b/.build.yml
deleted file mode 100644
index 8d74cd1..0000000
--- a/.build.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-pipeline:
-  build:
-    image: codingworkshop/oscw-runner:latest
-    commands:
-      - CORES=10 ./build-linux.sh
-  publish:
-    image: codingworkshop/oscw-runner:latest
-    secrets:
-      - OSCW_GITHUB_USERNAME
-      - OSCW_GITHUB_PASSWORD
-    when:
-      event: tag
-    commands:
-      - github_publish $OSCW_GITHUB_USERNAME $OSCW_GITHUB_PASSWORD $(ls xtchain-*-linux.tar.zst)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..db40ecb
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,23 @@
+name: Builds
+on:
+  push:
+    branches:
+      - '**'
+
+jobs:
+  xtchain:
+    runs-on: oscw
+    container:
+      image: codingworkshop/oscw-runner:latest
+    steps:
+      - name: Build
+        run: CORES=10 ./build-linux.sh
+      - name: Publish
+        on:
+          push:
+            tags:
+              - '**'
+        env:
+          OSCW_GITHUB_USERNAME: ${{ secrets.OSCW_GITHUB_USERNAME }}
+          OSCW_GITHUB_PASSWORD: ${{ secrets.OSCW_GITHUB_PASSWORD }}
+        run: github_publish $OSCW_GITHUB_USERNAME $OSCW_GITHUB_PASSWORD $(ls xtchain-*-linux.tar.zst)