Merge pull request #66 from natescherer/feature/improve-workflows #3
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: Test Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Release: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- name: Set Variables | |
run: | | |
"LOWERCASE_REPOSITORY=$($env:GITHUB_REPOSITORY.ToLower())" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Update PowerShell Metadata | |
uses: natescherer/update-powershell-metadata-action@v2 | |
with: | |
path: src | |
version: ${{ steps.gitversion.outputs.NuGetVersionV2 }} | |
copyright: (c) YYYY Nate Scherer. All rights reserved. | |
- name: Publish Module to Cloudsmith | |
uses: natescherer/publish-powershell-action@v1 | |
with: | |
token: ${{ secrets.CLOUDSMITH_KEY }} | |
target: nuget | |
nugetUrl: https://nuget.cloudsmith.io/${{ env.LOWERCASE_REPOSITORY }}/v3/index.json | |
path: src |