Skip to content

Commit

Permalink
ci: Automated builds
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ishere committed Dec 3, 2024
1 parent c4dc430 commit 9d4974d
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 11 deletions.
Binary file added .github/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: "Build release"
on:
push:
branches: main
tags: v*.*.*
pull_request:
branches: main

permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
name: nix build
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix build .#_ci.release
- id: zip
run: |
ref="${{github.ref_name}}"
ref="${ref//\//.}"
release="grubshin-bootpact-$ref"
cp -rL result "$release"
artefact="grubshin-bootpact-$ref.zip"
zip -r "$artefact" "$release"
echo "artefact=$artefact" >> "$GITHUB_OUTPUT"
- name: Create Release
id: create_release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ github.ref_name }} Release
tag_name: ${{ github.ref_name }}
draft: ${{ !startsWith(github.ref, 'refs/tags/') }}
discussion_category_name: announcements
generate_release_notes: true
fail_on_unmatched_files: true
files: |
${{ steps.zip.outputs.artefact }}
body: |
<p align="center">
<img
src="https://raw.githubusercontent.com/max-ishere/grubshin-bootpact/${{ github.sha }}/.github/logo.png"
alt="Grubshin Bootpact project logo"
height="100" />
</p>
# Version ${{ github.ref_name }} Released!
## Installation
Here is the TLDR of the installation instructions ([Full instuctions](https://github.com/max-ishere/grubshin-bootpact/blob/${{ github.sha }}/INSTALLATION.md)):
- Download the release zip (`${{ steps.zip.outputs.artefact }}`). It contains all the variants of the theme.
- Unzip and copy the variant you like to `/boot/grub/themes/grubshin-bootpact`.
> [!IMPORTANT]
> Make sure that after the theme is copied `theme.txt` is in
> `/boot/grub/themes/grubshin-bootpact/theme.txt`. Otherwise GRUB will not be able to find it.
- Add this to `/etc/default/grub`:
```
GRUB_THEME="/boot/grub/themes/grubshin-bootpact/theme.txt"
```
If its your first time installing see the full instructions using the link above.
> [!TIP]
> You can install multiple variants of the theme but only 1 can be active. Select the variant by
> changing the `GRUB_THEME` variable in `/etc/default/grub`
## Release notes
View the detailed release notes in the linked discussion (Join Discussion button below).
19 changes: 10 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
# grubTheme.url = "github:max-ishere/grub-theme.nix?ref=main";
grubTheme.url = "/home/max_ishere/Projects/grub-theme.nix";
grubTheme.url = "github:max-ishere/grub-theme.nix?ref=main";
grubTheme.inputs.nixpkgs.follows = "nixpkgs";
hywenhei-extended-font = {
url = "github:cawa-93/HYWenHei-Extended-Font?ref=main";
Expand Down Expand Up @@ -52,6 +51,9 @@
vscodevim.vim
jnoortheen.nix-ide
ms-vscode.hexeditor
github.vscode-github-actions
bierner.markdown-preview-github-styles
#me-dutour-mathieu.vscode-github-actions
];
})
nixd
Expand Down

0 comments on commit 9d4974d

Please sign in to comment.