ci/run-gitea-action-on-pr (#88)
Build'n check / run-ci-linux (push) Has been skipped Details

Reviewed-on: #88
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
This commit is contained in:
Sven Vogel 2024-11-21 15:18:27 +00:00 committed by Sven Vogel
parent bcc5d6ba22
commit 08602bc9ab
2 changed files with 18 additions and 39 deletions

View File

@ -1,10 +1,19 @@
name: Gitea Action for checking typst compilation
name: Build'n check
run-name: Performing Typst compilation
on: [push]
on:
push:
pull_request:
branches:
- main
jobs:
run-ci-linux:
runs-on: ubuntu-latest
# run action mutally exclusive on PRs or
# push with commit containing "Run-Checks"
if: >
(contains(github.event.head_commit.message, 'Run-Checks') &&
github.event_name == 'push') ||
github.event_name == 'pull_request'
steps:
- name: Check out repository code
uses: actions/checkout@v3
@ -16,5 +25,9 @@ jobs:
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run CI
run: nix-shell --run ./run-ci.sh
- name: Stylecheck
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
- id: build
name: Build
run: |
nix-shell --run ./run-ci.sh

View File

@ -1,34 +0,0 @@
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install dependencies for Nix setup action
run: |
apt update -y
apt install sudo -y
- name: Setup Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run CI
run: nix-shell --run ./run-ci.sh
- name: Setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Create release
id: create-release
uses: https://gitea.com/actions/release-action@main
with:
files: |-
example.pdf
api_key: '${{secrets.RELEASE_TOKEN}}'