From 6e5c2bc058a5c81ed5b4cb0baad4d85a4f365065 Mon Sep 17 00:00:00 2001 From: mateuszskoczek Date: Tue, 3 Feb 2026 22:33:03 +0100 Subject: [PATCH] Add analyze and publish workflow --- .gitea/workflows/analyze_and_publish.yml | 62 ++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .gitea/workflows/analyze_and_publish.yml diff --git a/.gitea/workflows/analyze_and_publish.yml b/.gitea/workflows/analyze_and_publish.yml new file mode 100644 index 0000000..7e41574 --- /dev/null +++ b/.gitea/workflows/analyze_and_publish.yml @@ -0,0 +1,62 @@ +name: Analyze code and publish script + +on: + push: + branches: + - "main" + paths: + - "cdl_downloader**" + +jobs: + analyze: + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Go to app directory + run: cd cdl_downloader + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pylint + - name: Analysing the code with pylint + run: pylint --exit-zero $(git ls-files '*.py') + publish: + steps: + - name: Checkout + uses: actions/checkout@v6.0.2 + with: + fetch-depth: 0 + - name: Setup GitVersion + uses: gittools/actions/gitversion/setup@v4.2.0 + with: + versionSpec: 6.4.x + - name: Determine version + uses: gittools/actions/gitversion/execute@v4.2.0 + id: gitversion + with: + configFilePath: ./.gitea/config/gitversion.yml + - name: Create .TAR.GZ archive + uses: ksm2/archive-action@v1 + with: + format: "tar.gz" + name: cdl_downloader_${{steps.gitversion.outputs.SemVer}} + include: "./cdl_downloader" + - name: Create .ZIP archive + uses: ksm2/archive-action@v1 + with: + format: "zip" + name: cdl_downloader_${{steps.gitversion.outputs.SemVer}} + include: "./cdl_downloader" + - name: Create Release + uses: akkuman/gitea-release-action@v1 + with: + tag_name: ${{steps.gitversion.outputs.SemVer}} + files: |- + cdl_downloader_${{steps.gitversion.outputs.SemVer}}.tar.gz + cdl_downloader_${{steps.gitversion.outputs.SemVer}}.zip + \ No newline at end of file