From a62ce03eb37c17a855056252f0dbbf659764f381 Mon Sep 17 00:00:00 2001 From: macniel Date: Thu, 25 Sep 2025 12:19:21 +0200 Subject: [PATCH] cicd: tinkers with release workflow --- .gitea/workflows/release.yaml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 23ad9b9c..ea4dc0c1 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -8,8 +8,29 @@ jobs: build: runs-on: node-01 steps: - - name: "testing sources" - - run: npm build - - run: npm test - - name: "releases package" - - run: echo "${{job.status}}" + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' # Specify the Node.js version you need + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm test + + - name: Build project + run: npm run build + + - name: Package build output + run: | + zip -r release.zip ./dist # Adjust the path to your build output directory + + - name: Upload release asset + run: | + curl -X POST -H "Content-Type: application/zip" \ + --data-binary @release.zip \ + "${{ .GITEA_API_URL }}/repos/${{ .GITEA_REPO_OWNER }}/${{ .GITEA_REPO_NAME }}/releases/${{ .GITEA_RELEASE_ID }}/assets?name=release.zip"