-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use major version tags in
README
and workflows (#2)
- Loading branch information
Showing
6 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,12 @@ jobs: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
uses: actions/checkout@v3 | ||
|
||
- name: Remove all preinstalled .NET SDKs | ||
shell: bash | ||
run: | | ||
"$GITHUB_WORKSPACE/test/cleanup.sh" | ||
- name: 'TEST: Set up specific .NET SDK version' | ||
id: setup-specific | ||
|
@@ -43,7 +48,7 @@ jobs: | |
- name: Clean up | ||
shell: bash | ||
run: | | ||
rm -rf "$DOTNET_ROOT" | ||
"$GITHUB_WORKSPACE/test/cleanup.sh" | ||
- name: 'TEST: Set up multiple .NET SDK versions' | ||
id: setup-multiple | ||
|
@@ -68,7 +73,7 @@ jobs: | |
- name: Clean up | ||
shell: bash | ||
run: | | ||
rm -rf "$DOTNET_ROOT" | ||
"$GITHUB_WORKSPACE/test/cleanup.sh" | ||
- name: 'Create "global.json"' | ||
shell: bash | ||
|
@@ -99,7 +104,7 @@ jobs: | |
- name: Clean up | ||
shell: bash | ||
run: | | ||
rm -rf "$DOTNET_ROOT" | ||
"$GITHUB_WORKSPACE/test/cleanup.sh" | ||
- name: 'TEST: Read .NET SDK version from "global.json" and input' | ||
id: setup-global-json-extra | ||
|
@@ -123,4 +128,4 @@ jobs: | |
- name: Clean up | ||
shell: bash | ||
run: | | ||
rm -rf "$DOTNET_ROOT" | ||
"$GITHUB_WORKSPACE/test/cleanup.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Update Floating Version Tags | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
update-semver: | ||
name: Update Tags | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update Semver | ||
uses: zyactions/update-semver@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
function try_rename () { | ||
temp=$(mktemp --dry-run XXXXXXXX) | ||
{ mv "$1" "$1_$temp" || :; } > /dev/null 2>&1 | ||
} | ||
|
||
if [[ -n "$DOTNET_ROOT" ]]; then | ||
try_rename "$DOTNET_ROOT" | ||
fi | ||
|
||
if [[ "$RUNNER_OS" == "Windows" ]]; then | ||
if [[ -n "$PROGRAMFILES" ]]; then | ||
try_rename "$PROGRAMFILES\dotnet" | ||
fi | ||
|
||
if [[ -n "$LOCALAPPDATA" ]]; then | ||
try_rename "$LOCALAPPDATA\Microsoft\dotnet" | ||
fi | ||
else | ||
try_rename "~/.dotnet" | ||
try_rename "/usr/share/dotnet" | ||
try_rename "/usr/local/share/dotnet" | ||
fi |