ci: rebuild GitHub action
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 2m17s Details

This commit is contained in:
Sven Vogel 2024-11-21 15:16:58 +01:00
parent 6408df38f6
commit d5a176a60a
2 changed files with 47 additions and 29 deletions

View File

@ -1,16 +0,0 @@
name: GitHub Action for checking typst compilation
run-name: Performing Typst compilation
on: [push]
jobs:
run-ci-linux:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- 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

View File

@ -1,12 +1,13 @@
name: release name: Build'n check on ${{ github.event.head_commit.message }}
on: on:
push: push:
tags: branches:
- 'v*.*.*' - main
jobs: jobs:
release: build:
name: Check Template and Build example
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository code - name: Check out repository code
@ -15,16 +16,49 @@ jobs:
uses: cachix/install-nix-action@v27 uses: cachix/install-nix-action@v27
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- name: Run CI - name: Stylecheck
run: nix-shell --run ./run-ci.sh run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
- id: build
name: Build
run: |
nix-shell --run ./run-ci.sh
- name: Upload artifact
id: artifact-upload
uses: actions/upload-artifact@v3
with:
name: example-document
path: ${{ github.workspace }}/example.pdf
if-no-files-found: error
retention-days: 1
- name: Output artifact ID
run: echo 'Artifact ID is ${{ steps.artifact-upload.outputs.artifact-id }}'
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup go - name: Setup go
uses: https://github.com/actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '>=1.20.1' go-version: '>=1.20.1'
- name: Create release - name: Download Artifcat
id: create-release id: download
uses: https://gitea.com/actions/release-action@main uses: actions/download-artifact@v3
with: with:
files: |- name: example-document
example.pdf path: ${{ github.workspace }}/Example.pdf
api_key: '${{secrets.RELEASE_TOKEN}}' - name: 'Artifact Download Path'
run: echo ${{ steps.download.outputs.download-path }}
- name: Prepare Release
run: echo ${{ github.sha }} > Release.txt
- name: Release ${{ GITHUB_REF_NAME }}
uses: softprops/action-gh-release@v2
with:
files: |
Example.pdf
Release.txt
LICENSE