From 4b8917de194a16721d8f1a7f5ae4f288031b71ba Mon Sep 17 00:00:00 2001 From: xenticore Date: Fri, 21 Mar 2025 14:31:45 -0400 Subject: [PATCH] ci: rework actions - build now only runs on non-versioned tags and PRs - release runs on versioned tags only --- .gitea/workflows/build.yaml | 6 +++++- .gitea/workflows/release.yaml | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 79eed0a..ba8a75a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,6 +1,10 @@ name: CI -on: [push, pull_request] +on: + push: + tags-ignore: + - 'v*' + pull_request: jobs: build: diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index efd9757..d8b756a 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -3,7 +3,7 @@ name: CI on: push: tags: - - '*' + - 'v*' jobs: build: @@ -22,6 +22,14 @@ jobs: name: tf2wikipricing.user.js path: | dist/userscript/tf2wikipricing.user.js + deploy: + runs-on: debian-latest + needs: build + steps: + - name: Download release artifacts + uses: actions/download-artifact@v3 + with: + name: tf2wikipricing.user.js - name: Read package.json version uses: tyankatsu0105/read-package-version-actions@v1 id: version @@ -30,5 +38,6 @@ jobs: uses: akkuman/gitea-release-action@v1 with: name: ${{ steps.version.outputs.version }} - files: |- - /dist/userscript/** \ No newline at end of file + files: | + *.user.js + sha256sum: true \ No newline at end of file