Bump actions/download-artifact from 2.0.6 to 4.1.7 in /.github/workflows #30
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.101 | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
# NUGET_PUBLISH_API_KEY | |
- name: Upload Build Artifact | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: build_artifact | |
# A file, directory or wildcard pattern that describes what to upload | |
path: InkyTagHelpers/ | |
# The desired behavior if no files are found using the provided path. | |
publish: | |
name: Publish | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Download a Build Artifact | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: build_artifact | |
- name: Publish NuGet | |
# You may pin to the exact commit or the version. | |
# uses: brandedoutcast/publish-nuget@c12b8546b67672ee38ac87bea491ac94a587f7cc | |
uses: brandedoutcast/[email protected] | |
with: | |
# Filepath of the project to be packaged, relative to root of repository | |
PROJECT_FILE_PATH: /home/runner/work/InkyTagHelpers/InkyTagHelpers/InkyTagHelpers.csproj | |
NUGET_KEY: ${{ secrets.NUGET_PUBLISH_API_KEY }} | |
# NuGet server uri hosting the packages, defaults to https://api.nuget.org | |
NUGET_SOURCE: https://api.nuget.org | |
release: | |
name: Release | |
needs: [publish] | |
runs-on: ubuntu-latest | |
# release task is not working at the moment. `ChiefNoir/gaction-version-getter` is getting a wrong version (1.0.0.0) and `actions/create-release` says `Parameter token or opts.auth is required`? | |
if: true == false | |
steps: | |
- name: Download a Build Artifact | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: build_artifact | |
- name: gaction-version-getter | |
id: get_version | |
# You may pin to the exact commit or the version. | |
# uses: ChiefNoir/gaction-version-getter@c0c29cd9b59ae3e4216e4cb71285c148eb36a185 | |
uses: ChiefNoir/gaction-version-getter@v2 | |
with: | |
# path to the .csproj file | |
projectPath: /home/runner/work/InkyTagHelpers/InkyTagHelpers/InkyTagHelpers.csproj | |
- name: Create a Release | |
uses: actions/[email protected] | |
with: | |
# The name of the tag. This should come from the webhook payload, `github.GITHUB_REF` when a user pushes a new tag | |
tag_name: ${{ steps.get_version.outputs.projectVersion }} | |
# The name of the release. For example, `Release v1.0.1` | |
release_name: Release v${{ steps.get_version.outputs.projectVersion }} | |
- name: Upload a Release Asset | |
uses: actions/[email protected] | |
with: | |
# The URL for uploading assets to the release | |
upload_url: https://www.nuget.org/api/v2/package/InkyTagHelpers/${{ github.GITHUB_REF }} | |
# The name of the asset you want to upload | |
asset_name: inkytaghelpers.${{ steps.get_version.outputs.projectVersion }}.nupkg | |
# The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information | |
asset_content_type: application/zip |