Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
ci: add test release and update flake
Browse files Browse the repository at this point in the history
  • Loading branch information
storopoli committed Nov 6, 2023
1 parent 8ee081f commit fbc0c4e
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @storopoli
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
36 changes: 36 additions & 0 deletions .github/workflows/build-slides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Slides
on:
push: {}
pull_request: {}

jobs:
build-release:
name: Build Slides
runs-on: ubuntu-latest
permissions:
contents: write
env:
working-directory: ./slides
defaults:
run:
working-directory: ${{ env.working-directory }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v6

- name: Cache Nix artifacts
uses: DeterminateSystems/magic-nix-cache-action@v2

- name: Build Slides
run: nix build -L

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: output
path: ./result/slides.pdf
if-no-files-found: error
37 changes: 37 additions & 0 deletions .github/workflows/release-slides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Release Slides

on:
push:
tags:
- "*"

jobs:
build-release:
name: Build and Release Slides
runs-on: ubuntu-latest
permissions:
contents: write
env:
working-directory: ./slides
defaults:
run:
working-directory: ${{ env.working-directory }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v6

- name: Cache Nix artifacts
uses: DeterminateSystems/magic-nix-cache-action@v2

- name: Build Slides
run: nix build -L

- name: Release
uses: ncipollo/release-action@v1
id: release
with:
artifacts: "./result/slides.pdf"
30 changes: 30 additions & 0 deletions .github/workflows/update_flake_lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update Flake Lock File

on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

jobs:
lockfile:
runs-on: ubuntu-latest
env:
working-directory: ./slides
defaults:
run:
working-directory: ${{ env.working-directory }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v6

- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v20
with:
pr-title: "fix: update flake.lock" # Title of PR to be created
pr-labels: | # Labels to be set on the PR
dependencies
automated

0 comments on commit fbc0c4e

Please sign in to comment.