Skip to content

Commit

Permalink
h
Browse files Browse the repository at this point in the history
  • Loading branch information
leap0x7b committed Feb 4, 2024
1 parent 02bc242 commit b6423c8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update version on build.zig.zon
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
- name: Get latest version
run: echo "LIMINE_VERSION=$(curl https://api.github.com/repos/limine-bootloader/limine/releases/latest -s | jq .name -r | sed 's/v//g')" >> $GITHUB_ENV
- name: Update version
run: sed "s/LIMINE_VERSION/${{ env.LIMINE_VERSION }}/g" build.zig.zon.template > build.zig.zon
- name: Push changes
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git commit -am "Update to v${{ env.LIMINE_VERSION }}"
git push
5 changes: 4 additions & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.{ .name = "limine-bin" }
.{
.name = "limine-bin",
.version = "latest",
}
4 changes: 4 additions & 0 deletions build.zig.zon.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.{
.name = "limine-bin",
.version = "LIMINE_VERSION",
}

0 comments on commit b6423c8

Please # to comment.