From 8dc61c01fe84c4870db541d79ad3f1de536b83b5 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 19 Jul 2024 09:23:39 +0200 Subject: [PATCH 1/4] added github workflow --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4841550 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: GitHub Action for checking typst compilation +run-name: Performing Typst compilation +on: [push] + +jobs: + run-ci-linux: + runs-on: ubuntu-latest + env: + TYPST_INSTALL: /usr/local + TYPST_VERSION: 0.11.1 + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Install Typst CLI + run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION" + - name: Set up Python 3 + run: apt update -y && apt install python3-pip -y + - name: Run CI + run: bash -c ./run-ci.sh From cc56ccecd770048a5d8a32c6b118a4e5cf771dfa Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 19 Jul 2024 09:31:17 +0200 Subject: [PATCH 2/4] changed install path for typst --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4841550..33848c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: run-ci-linux: runs-on: ubuntu-latest env: - TYPST_INSTALL: /usr/local + TYPST_INSTALL: $HOME/.typst TYPST_VERSION: 0.11.1 steps: - name: Check out repository code @@ -16,4 +16,4 @@ jobs: - name: Set up Python 3 run: apt update -y && apt install python3-pip -y - name: Run CI - run: bash -c ./run-ci.sh + run: export PATH="$TYPST_INSTALL/bin:$PATH" && bash -c ./run-ci.sh From b827520692fee6a147fcbfd9750d89c89fac888e Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 19 Jul 2024 09:36:48 +0200 Subject: [PATCH 3/4] added python setup action --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33848c0..6a59f83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,8 @@ jobs: uses: actions/checkout@v3 - name: Install Typst CLI run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION" - - name: Set up Python 3 - run: apt update -y && apt install python3-pip -y + - uses: actions/setup-python@v5 + with: + python-version: '3.11' - name: Run CI run: export PATH="$TYPST_INSTALL/bin:$PATH" && bash -c ./run-ci.sh From e1dd12cdfdc44926163c22d8d2781cec557016f3 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 19 Jul 2024 09:45:23 +0200 Subject: [PATCH 4/4] added release on tag github action --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bb6e717 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Install Typst CLI + run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION" + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Run CI + run: export PATH="$TYPST_INSTALL/bin:$PATH" && bash -c ./run-ci.sh + - name: Create Release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false \ No newline at end of file