Skip to content

Commit ec26fa9

Browse files
authored
Merge branch 'nix-community:main' into main
2 parents 4252a43 + 1bfb978 commit ec26fa9

File tree

23 files changed

+176
-98
lines changed

23 files changed

+176
-98
lines changed

.github/actions/install-nix/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ runs:
1414
1515
- name: Install Nix ❄️
1616
if: ${{ steps.check-nix.outputs.nix-found != 'true' }}
17-
uses: cachix/install-nix-action@c134e4c9e34bac6cab09cf239815f9339aaaf84e # v31
17+
uses: cachix/install-nix-action@9280e7aca88deada44c930f1e2c78e21c3ae3edd # v31.7.0
1818
with:
1919
github_access_token: ${{ github.token }}

.github/actions/setup-dotnet/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ runs:
66
using: 'composite'
77
steps:
88
- name: Setup MSBuild # Needed for APPX packaging
9-
uses: microsoft/setup-msbuild@ede762b26a2de8d110bb5a3db4d7e0e080c0e917 # v1.3
9+
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
1010
with:
1111
vs-version: '[17.2,'
1212

1313
- name: Setup .NET SDK
1414
id: setup-dotnet
15-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
15+
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
1616
with:
1717
dotnet-version: 8
1818
cache: true

.github/actions/version/action.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,34 @@ outputs:
66
runs:
77
using: 'composite'
88
steps:
9-
- name: Generate/Set Version 🏷️
9+
- name: Generate Version 🏷️
1010
id: version
1111
shell: pwsh
1212
run: |
13-
$LATEST_TAG = git describe --tags --abbrev=0 # Get the latest tag name
14-
$COMMIT_COUNT = git rev-list --use-bitmap-index --count "$(git rev-list --tags --no-walk --max-count=1)..HEAD" # Count all commits since the last tag
15-
$NIXOS_WSL_VERSION = "$($LATEST_TAG -replace '(.+)\.(.+)\.(.+)\..+', '$1.$2.$3').${COMMIT_COUNT}" # Compose the NixOS-WSL version number
16-
Write-Output "version=${NIXOS_WSL_VERSION}" >> $env:GITHUB_OUTPUT
13+
if ('${{ github.event_name }}' -eq 'pull_request') {
14+
$version = 'pr-${{ github.event.pull_request.number }}'
15+
$is_numeric = ''
16+
} elseif ('${{ github.ref_name }}' -like 'release-*') {
17+
$latest_tag = git describe --tags --abbrev=0
18+
$commit_count = git rev-list --use-bitmap-index --count "$(git rev-list --tags --no-walk --max-count=1)..HEAD"
19+
$version = "$($latest_tag -replace '(.+)\.(.+)\.(.+)\..+', '$1.$2.$3').${commit_count}"
20+
$is_numeric = 1
21+
} else {
22+
$version = '${{ github.ref_name }}'
23+
$is_numeric = ''
24+
}
25+
"version=$version" | Tee-Object -FilePath $env:GITHUB_OUTPUT -Append
26+
"is_numeric=$is_numeric" | Tee-Object -FilePath $env:GITHUB_OUTPUT -Append
1727
18-
Write-Output $NIXOS_WSL_VERSION > ./VERSION
19-
Write-Output $(git rev-parse HEAD) >> ./VERSION
20-
((Get-Content -path ./Launcher/Launcher/Launcher.csproj -Raw) -replace '1.3.3.7',$NIXOS_WSL_VERSION) | Set-Content -Path ./Launcher/Launcher/Launcher.csproj
21-
((Get-Content -path ./Launcher/Launcher-Appx/Package.appxmanifest -Raw) -replace '1.3.3.7',$NIXOS_WSL_VERSION) | Set-Content -Path ./Launcher/Launcher-Appx/Package.appxmanifest
28+
- name: Set Version 🏷️
29+
shell: pwsh
30+
run: |
31+
Write-Output '${{ steps.version.outputs.version }}' | Tee-Object -FilePath ./VERSION
32+
Write-Output "$(git rev-parse HEAD)" | Tee-Object -FilePath ./VERSION -Append
33+
34+
- name: Set Launcher Version 🏷️
35+
shell: pwsh
36+
if: ${{ steps.version.outputs.is_numeric }}
37+
run: |
38+
((Get-Content -path ./Launcher/Launcher/Launcher.csproj -Raw) -replace '1.3.3.7','${{ steps.version.outputs.version }}') | Set-Content -Path ./Launcher/Launcher/Launcher.csproj
39+
((Get-Content -path ./Launcher/Launcher-Appx/Package.appxmanifest -Raw) -replace '1.3.3.7','${{ steps.version.outputs.version }}') | Set-Content -Path ./Launcher/Launcher-Appx/Package.appxmanifest

.github/renovate.json5

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"helpers:pinGitHubActionDigests",
77
],
88
labels: ["release-exclude", "renovate"],
9-
baseBranches: ["main", "/^release-.+$/"],
9+
baseBranchPatterns: ["main", "/^release-.+$/", "renovate-test"],
1010
nix: {
1111
enabled: true,
1212
},
@@ -15,6 +15,17 @@
1515
extends: ["schedule:weekly"],
1616
automerge: true,
1717
},
18+
customManagers: [
19+
{
20+
// WSL repo checkout job
21+
customType: "regex",
22+
fileMatch: [".github\\/.+\\.ya?ml$"],
23+
matchStrings: [
24+
"repository:\\s*(?<depName>[^/\\s]+/[^/\\s]+)\\s*ref:\\s*(?<currentValue>[^\\s]+)",
25+
],
26+
datasourceTemplate: "github-tags",
27+
},
28+
],
1829
packageRules: [
1930
{
2031
// De-Prioritize release branches

.github/workflows/on_command.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
runs-on: ubuntu-latest
5555
steps:
5656
- name: Checkout
57-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
57+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5858

5959
- name: Get PR branch
6060
id: branch
@@ -64,7 +64,7 @@ jobs:
6464
echo "branch=$(gh pr view ${{ github.event.issue.number }} --json headRefName -q .headRefName)" >> $GITHUB_OUTPUT
6565
6666
- name: Dispatch workflow
67-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
67+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
6868
with:
6969
script: |
7070
github.rest.actions.createWorkflowDispatch({

.github/workflows/on_label.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
permission: write
2929

3030
- name: Checkout
31-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3232

3333
- name: Create backport PR
3434
id: backport
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: Checkout
51-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5252

5353
- name: Get PR branch
5454
id: branch
@@ -58,7 +58,7 @@ jobs:
5858
echo "branch=$(gh pr view ${{ matrix.pr }} --json headRefName -q .headRefName)" >> $GITHUB_OUTPUT
5959
6060
- name: Dispatch workflow
61-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
61+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
6262
with:
6363
script: |
6464
github.rest.actions.createWorkflowDispatch({

.github/workflows/on_push.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ jobs:
4949
needs:
5050
- build
5151

52+
validate:
53+
name: Validate 🩺
54+
uses: ./.github/workflows/run_validate.yml
55+
needs:
56+
- build
57+
5258
docs:
5359
name: Docs 📕
5460
uses: ./.github/workflows/run_docs.yml
@@ -62,6 +68,7 @@ jobs:
6268
- build
6369
- checks
6470
- tests
71+
- validate
6572
- docs
6673
steps:
6774
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
@@ -75,6 +82,7 @@ jobs:
7582
- 📋 Checks: ${{ needs.checks.result && '✅' || '❌' }}
7683
- 🛠️ Build: ${{ needs.build.result && '✅' || '❌' }}
7784
- 🧪 Tests: ${{ needs.tests.result && '✅' || '❌' }}
85+
- 🩺 Validate: ${{ needs.validate.result && '✅' || '❌' }}
7886
- 📕 Docs: ${{ needs.docs.result && '✅' || '❌' }}
7987
8088
[See the logs here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
@@ -86,6 +94,7 @@ jobs:
8694
"Checks" = "${{ needs.checks.result }}"
8795
"Build" = "${{ needs.build.result }}"
8896
"Tests" = "${{ needs.tests.result }}"
97+
"Validate" = "${{ needs.validate.result }}"
8998
"Docs" = "${{ needs.docs.result }}"
9099
}
91100

.github/workflows/on_release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: "Release"
22

33
on:
44
push:
5-
tags: []
5+
tags:
6+
- "*"
67

78
jobs:
89
build:
@@ -16,7 +17,7 @@ jobs:
1617
runs-on: ubuntu-latest
1718
steps:
1819
- name: Download Tarball 📥
19-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
20+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
2021
with:
2122
name: tarball
2223

@@ -25,7 +26,7 @@ jobs:
2526
sha256sum nixos.wsl > nixos.wsl.sha256
2627
2728
- name: Attach to Release 📎
28-
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2
29+
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
2930
with:
3031
files: |
3132
nixos.wsl

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ jobs:
2424
pull-requests: write
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6
27+
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/run_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
12+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1313
with:
1414
fetch-depth: 0
1515

@@ -30,7 +30,7 @@ jobs:
3030
filename: nixos.wsl
3131

3232
- name: Upload Tarball 📤
33-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
33+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3434
with:
3535
name: tarball
3636
path: nixos.wsl

0 commit comments

Comments
 (0)