Skip to content

Commit

Permalink
Modernize actions & pre-commit & nixpkgs (#71)
Browse files Browse the repository at this point in the history
* update: action versions and default nixpkgs

* update: cache so it doesn't hang

* update: pre-commit hooks

* update: nixpkgs version referenced in flake
  • Loading branch information
winny- authored Sep 7, 2024
1 parent 8ed6825 commit 46bd97c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
env:
PRE_COMMIT_HOME: .pre-commit-cache
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Allow workspace
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Cache .pre-commit-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.pre-commit-cache
Expand All @@ -24,10 +24,10 @@ jobs:
- pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: channel:nixos-22.11
nix_path: nixpkgs=channel:nixos-24.05
# Note that cachix-action isn't used here. It adds a couple seconds to
# CI time, so if nothing is cachable, just save those seconds. You'd
# waste a minute of CI time for every 15 runs.
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
dot_love:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: channel:nixos-22.11
- uses: cachix/cachix-action@v12
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: bismuthsoft
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
Expand All @@ -30,7 +30,7 @@ jobs:
"$(nix eval --raw .#super_rogue.dot_love)/super_rogue.love" \
>> "$GITHUB_OUTPUT"
id: dot_love
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dot_love-${{ github.sha }}
path: ${{ steps.dot_love.outputs.DOT_LOVE }}
Expand All @@ -40,11 +40,11 @@ jobs:
- dot_love # Use pre-built game.love via cachix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: channel:nixos-22.11
- uses: cachix/cachix-action@v12
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: bismuthsoft
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
Expand All @@ -65,8 +65,8 @@ jobs:
- dot_love
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- name: Build Linux packages
Expand Down Expand Up @@ -95,8 +95,8 @@ jobs:
- dot_love
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- name: Build macOS packages
Expand All @@ -122,7 +122,7 @@ jobs:
dmg-volume-name: "super_rogue"
dmg-window-position: "200 120"
dmg-window-size: "1024 604"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist-mac
path: dist
Expand All @@ -131,8 +131,8 @@ jobs:
- dot_love
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- name: Build Windows packages
Expand All @@ -159,20 +159,20 @@ jobs:
- dot_love
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-windows
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist-linux
- run: |
mv super_rogue_x86.zip super_rogue_windows_x86.zip
mv super_rogue_x64.zip super_rogue_windows_x64.zip
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
# if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-toml
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

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

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "A very basic flake";

inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
inputs.nixpkgs.url = "nixpkgs/nixos-24.05";

outputs = { self, nixpkgs }: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.buildPackages;
Expand Down

0 comments on commit 46bd97c

Please sign in to comment.