From 24d55103371b6d242fe29359e629826d3fed09a4 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Thu, 31 Jul 2025 10:04:15 +0100 Subject: [PATCH] Update CI Signed-off-by: Nikolaos Karaolidis --- .gitea/workflows/main.yaml | 58 ++++++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 42 --------------------------- 2 files changed, 58 insertions(+), 42 deletions(-) create mode 100644 .gitea/workflows/main.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml new file mode 100644 index 0000000..4fb0b1f --- /dev/null +++ b/.gitea/workflows/main.yaml @@ -0,0 +1,58 @@ +name: Build and Release PDF + +on: + push: + branches: + - "**" + +jobs: + build: + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.set-tag.outputs.tag }} + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Install LaTeX (XeLaTeX) + run: | + sudo apt-get update + sudo apt-get install -y texlive-xetex + + - name: Compile PDF + run: | + xelatex main.tex + + - name: Set tag output + id: set-tag + run: echo "tag=release-${{ env.GITHUB_SHA }}" >> $GITHUB_OUTPUT + + - name: Upload PDF Artifact + uses: actions/upload-artifact@v3 + with: + name: main-pdf + path: main.pdf + retention-days: 1 + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Download PDF Artifact + uses: actions/download-artifact@v3 + with: + name: main-pdf + path: . + + - name: Create Gitea Release + uses: https://gitea.com/actions/release-action@main + with: + api_key: "${{ secrets.RELEASE_TOKEN }}" + tag: ${{ needs.build.outputs.tag }} + files: | + main.pdf diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 1ff52e7..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,42 +0,0 @@ -variables: - GIT_SUBMODULE_STRATEGY: recursive - -stages: - - build - - release - -build: - image: texlive/texlive - stage: build - script: - - xelatex main.tex - after_script: - - echo "JOB_ID=$CI_JOB_ID" >> job.env - artifacts: - paths: - - "*.pdf" - expire_in: 1d - reports: - dotenv: job.env - except: - - tags - -release: - image: registry.gitlab.com/gitlab-org/release-cli - stage: release - needs: - - job: build - artifacts: true - script: - - echo "Create Release $CI_COMMIT_SHA" - release: - name: "Release $CI_COMMIT_SHA" - tag_name: "release-$CI_COMMIT_SHA" - ref: "$CI_COMMIT_SHA" - description: "Release $CI_COMMIT_SHA" - assets: - links: - - name: "main.pdf" - url: "https://git.karaolidis.com/karaolidis/cv/-/jobs/$JOB_ID/artifacts/raw/main.pdf" - except: - - tags