Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/credfeto/action-dotnet-version-detect
detects the version of dotnet core that should be installed
https://github.com/credfeto/action-dotnet-version-detect
Last synced: about 1 month ago
JSON representation
detects the version of dotnet core that should be installed
- Host: GitHub
- URL: https://github.com/credfeto/action-dotnet-version-detect
- Owner: credfeto
- License: mit
- Created: 2020-05-06T22:05:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T16:04:54.000Z (9 months ago)
- Last Synced: 2024-04-10T19:52:36.023Z (9 months ago)
- Language: Shell
- Size: 1.94 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Dotnet core version detector
Determines the version of dotnet core to install based on the src/global.json
## How to use it?
This is a GitHub action, so it has to be added to a GitHub workflow.A simple example of running this action on all pushes to the repository would be
to add a `dotnetcore.yml` file under `.github/workflows` with the following content
```yaml
on: [push]jobs:
dotnet-build:
runs-on: ubuntu-latest
name:
steps:
# Checkout the source code so there are some files to look at.
- uses: actions/checkout@v1
# Run the version detection action
- name: Determine the version of dotnet core to install from src/global.json
uses: credfeto/[email protected]
with:
file: src/global.json
fallback: 3.1.404
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build
run: |
cd src
dotnet build```
On each push, it will now install the version of dotnet core specified in src/global.json, install it and build the source
## Contributors